changing the state of something until a button is clicked

Jul 24, 2017

Is there a way to have a button or object to continuously change states (enabled to disabled to enabled) until a button is clicked?

6 Replies
Daniel Sposato (Philly)

Hey Vanessa, yes this is possible. There are a few different ways of doing it but using a variable that is set to a random like number is an easy way to do it.

To get the random like number you can use a very short simple animation that loops to add to a variable.  You basically set up a trigger that adds 1 to the variable every time the animation completes until it reaches a certain value.

Then when it reaches the value you max it at, you set it equal to 1 and let it start over.

Next you need to set up the states for your object and when the user clicks (or does whatever you want the triggering action to be) it sets another variable equal to the random like number at the time it is clicked.

Then you have another group of triggers set to tell the object to display the state that you decide relates to the number grabbed.

Let me know if this make sense?

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