Drag and Drop triggers that change image states not working properly

Dec 18, 2018

I have created a drag and drop from scratch and everything works fine with the exception of one element, a set of pictures I have set to change states when items are dropped is not functioning properly. Basically, I have two drop zones and six droppers. Each of the two zones takes three droppers apiece, and there is a corresponding animation associated with each drop. I have two images that change after each drop. Each has four states, one for the initial resting stage and one for each stage of the drop process thereafter (valued at 0-1-2-3). The triggers I have set up are essentially "if item 1 is dropped onto rectangle 1, change state of picture 1 to state 1, if state of picture 1 is 0." I have three of these triggers for each dropper, so the next would be "if item 1 is dropped onto rectangle 1, change state of picture 1 to state 2, if state of picture 1 is 1" and so on. This is meant to ensure that the picture progresses through the states properly, since the draggers can be dropped in any order. However, when the the first item is dropped, the image immediately jumps to state "3" rather than "1" for some reason. Any idea as to why?

4 Replies
Shaun Martin

Hi Kevin,

It might be the trigger order. All the triggers are run when you drop the drop item. So the first trigger in your list will change it to state '1' because it is currently state '0'. But then the next trigger is checked and it will change it to state' 2' becasue we've just changed it to state '1'.

Try reversing the trigger order like this - worked for me:

Ben McKenna

Hey Kevin,

By the sounds of it, it could be down to the order of your triggers.

Storyline fires triggers in sequential order. So when you drop the object, it's not just firing the trigger that fits the condition at that moment in time, but rather ALL of the triggers one after the other. After the first trigger fires, your object changes from state 0 to state 1, so now all of a sudden your object is state 1 which means it fits the condition for the next trigger (state 1 to state 2), then it fits the condition for the NEXT trigger (state 2 to state 3 trigger), etc. 

So what should fix this problem is REVERSING the order of your triggers in the trigger panel. Put the trigger for state 2 to 3 above the trigger for state 1 to 2, etc.

Hope this helps!

EDIT: Beaten to it!

This discussion is closed. You can start a new discussion or contact Articulate Support.