Forum Discussion
Adding two of the same states to the same dial
I'm attempting to build a simulation where the user can either click on the right side of a dial or the left side of the dial and the dial would turn in the respective direction for a split second and then return to the center, basically acting like the Down state but in opposite directions depending on which side of the dial they are clicking. Is this possible to create?
- WaltHamiltonSuper Hero
It is pretty easy, and long as you are willing to sacrifice the ability to move the dial.
Create a click zone above each half of the dial. I would use a transparent shape because shapes don’t carry the baggage hotspots do. It has to have no outline, a fill, and have a high transparency (95% - 99%).
Create a shape that is placed off the stage, and give it a motion path of any length or kind, with a duration of the length of the split second you want.
The triggers are:
Add [appropriate amount] to variable [dial variable] when user clicks transparent shape on right.
Move off-stage object on motion path when user clicks shape on right
Set dial variable to 0 (or as appropriate) when motion path ends.
Of course, for the other shape, the first trigger subtracts.
If you want the dial to be useable as a normal dial, you will get involved in a more complicated dance of setting the shapes to Hidden state (to click dial), and Normal state (to reset the dial). In that case, I would recommend a separate reset button that doesn’t interfere with the normal dial behavior.