Change shape state based on variable value

Mar 31, 2021

Hi all,

I'm trying to change the state of a shape based on a variable value. For example, if the variable value is 5, then the state of the shape should be the one that's named 5, if the variable value is 42, the state should be the one named 42 etc.

I know I can set up a trigger for each value/state but i've got 100 states it could be (named 1 to 100) and I don't really want to set up 100 triggers for each shape! Is there an easier way to do this either within storyline or with some javascript magic?

3 Replies
Ron Linder

Yeah sounds like it, 100 triggers is your only bet. I am in the same boat. They need to allow people to change state based on variable. The issue with that is they need to edit check that the variable values allow the software to know what state is to be shown when which is where this becomes complex for whoever will want to code this feature into Articulate if ever. Maybe create a new variable format (ie StateChanger rather then Number or Text) that lists your states when linked to an object with states, again not an easy logic to code...

Walt Hamilton

Programmer-type people have been wanting this ability for decades. To the best of my knowledge, it doesn't exist in any language. You have to write one or two lines of code for each possible state.

Apple's old,old BASIC used to have a "ON variable GOTO X, Y, Z", but I think that got dropped when line numbers went out.