Hi all, I'm trying to create an interaction in storyline 2 where you have to get a picture of a minion home without going over a picture of a swamp. I've used relative motion paths linked to up, down, left & right arrows to move him around the screen and have created a layer to use if he goes over the swamp. My problem is that I don't seem to be able to trigger the layer. I tried 'show layer' when object dragged over but it doesn't seem to work. Any ideas gratefully received.
The When object dragged over only functions for a drag object. In your case, it sounds like you don't have users drag the object but move it by pressing keyboard keys. I would set up two variables x and y. X is increased or decreased when you press the left or right keys. Y is increased or decreased when you press the up or down keys. With these two variables you can determine where on the screen you are, including whether or not you are within the swamp area. Then you could trigger the layer based on the values of these two variables.
Thanks Michael, I'll have a look at that tomorrow. Only just learning Storyline at the moment and not done much with variables but will have a go. At the moment the users don't push the keyboard buttons t move him around, rather icons on the screen but your way for that also sounds cleaner.
I used this approach for the the fourth example here. By using two variables I know where in the maze the ball is at any point in time. Based on that x_y position I disable and reenable the Up, Down, Left, Right buttons. Give it a try.
Thanks Michael. My issue came out of playing with motion paths so all example sin your attached are helpful. I will look at it tomorrow as my wife will kill me if I don't go home soon.
Hi Chris, Have you tried putting a hotspot over the swamp image and then
setting the trigger to show the layer when the object (the minion) is
dragged over the hotspot? I've had success in the past using hotspots for
these kinds of interactions, so maybe this solution will work for you too.
I hope it helps! - Anne
Thanks Anne, I've had a go at this but I'm having the same problem as before. II'm guessing it is because the minion isn't being dragged over, rather moved over via keyboard (thanks Michael) interactions
Hi Chris, OK, that’s good to know - many thanks for the info. I’m sure Michael’s solution will work for you – he definitely knows what he’s doing! I’m really curious now about what’s possible with those x and y variables… another item to add to my e-learning bucket list! :)
@Michael Hinze - Just had a go at the variable idea and it works a treat. Would I be right in saying you used a similar process to disable the arrow buttons in the scrolling landscape picture (the one with markers)?
10 Replies
The When object dragged over only functions for a drag object. In your case, it sounds like you don't have users drag the object but move it by pressing keyboard keys. I would set up two variables x and y. X is increased or decreased when you press the left or right keys. Y is increased or decreased when you press the up or down keys. With these two variables you can determine where on the screen you are, including whether or not you are within the swamp area. Then you could trigger the layer based on the values of these two variables.
Thanks Michael, I'll have a look at that tomorrow. Only just learning Storyline at the moment and not done much with variables but will have a go. At the moment the users don't push the keyboard buttons t move him around, rather icons on the screen but your way for that also sounds cleaner.
I used this approach for the the fourth example here. By using two variables I know where in the maze the ball is at any point in time. Based on that x_y position I disable and reenable the Up, Down, Left, Right buttons. Give it a try.
Thanks Michael. My issue came out of playing with motion paths so all example sin your attached are helpful. I will look at it tomorrow as my wife will kill me if I don't go home soon.
Hi Chris, Have you tried putting a hotspot over the swamp image and then
setting the trigger to show the layer when the object (the minion) is
dragged over the hotspot? I've had success in the past using hotspots for
these kinds of interactions, so maybe this solution will work for you too.
I hope it helps! - Anne
Thanks Anne, I've had a go at this but I'm having the same problem as before. II'm guessing it is because the minion isn't being dragged over, rather moved over via keyboard (thanks Michael) interactions
Hi Chris, OK, that’s good to know - many thanks for the info. I’m sure Michael’s solution will work for you – he definitely knows what he’s doing! I’m really curious now about what’s possible with those x and y variables… another item to add to my e-learning bucket list! :)
Thanks anyway Anne. We've only recently got Storyline and I'm currently upskilling myself. I'm finding this community a really valuable resource.
@Michael Hinze - Just had a go at the variable idea and it works a treat. Would I be right in saying you used a similar process to disable the arrow buttons in the scrolling landscape picture (the one with markers)?
I don't have access to the .story file right now, but that sounds right.
This discussion is closed. You can start a new discussion or contact Articulate Support.