Forum Discussion
Change Variable based on state
Hello Heroes,
in my project I want to get variables changed based on states. There is the possibility to get a variable changed, "if minimum 1 object has (not) a state".
I attached the picture of the trigger, I'm talking about and a Test-SL-File.
In my opinion it should work to get the different variable values when all objects are in normal state or in other states and i want to have a 3rd value, when nothing of all fits.
Hope u guys can help me.
- MariaCSStaff
Hi, Nicky.
Thank you for sharing your .story file!
I'm attaching the edited version here with my suggestion, which is to create another state called "grey" for your ovals instead of using the Normal state.
Once the triggers are changed to reflect the new state, the project works as expected.
Let me know if this helps!
- NicoleKluge-fdcCommunity Member
Oh Maria, thanks for your help. This is strange that u cannot use the normal state for such things.
I also noticed that it is very important to check the order of the triggers, cause sometimes it happens that there are two conditions correct and one of them is more specific, so u put it after the other trigger. U can manage it by copy and paste, to get it below other triggers.
then again thank you Maria, that worked for me and my problem :)
- MariaCSStaff
Hi, Nicky.
I'm happy it was helpful!
Yes, the order of triggers is very important in Storyline. You can learn more about it here:
You can use the arrows to move the triggers instead of copying and pasting them:
- NicoleKluge-fdcCommunity Member
Hi Maria,
thanks for showing it, but those arrows are not always there. In my example they are disabled. They only appear when you have triggers on an object. In my example it could happen that the variable gets overwritten by another trigger.