Forum Discussion
KimLewis-93446b
4 years agoCommunity Member
Objects with multiple triggers
I have a picture that I have added an 'Enlarge' state for, and I've created a trigger. Is it possible to set a second trigger to shrink the object to its normal state?
MariaCS
4 years agoStaff
Hi, Kim.
Just to expand a little on what Judy said, if I understand correctly, you want your object to have two states that happen when you click that same object.
You can add a true or false variable and toggle between the values, which will execute a specific trigger.
In the example below, I have a rectangle with two states (Normal and Larger), and clicking the rectangle moves between those states.
I created a toggle variable and the following triggers:
- Toggle the variable when the user clicks the rectangle.
- Change the state of the rectangle to larger when the variable is false.
- Change the state of the rectangle to normal when the variable is true.
The result:
I hope this helps!
Related Content
- 2 months ago
- 11 months ago
- 7 months ago