Forum Discussion
Drag and drop feedback using changing states
Here is the problem
Every trigger that fires when the learner clicks Diz_09 is executed every time the learner clicks. So follow these two triggers through slowly and logically. The state of Diz_09 is Normal. The learner clicks. The first trigger does nothing, because its state is Normal. Then the second trigger changes the state to Dropped because the state is not Dropped. Click again, and the first state changes it to Dropped_Back, because its state is Dropped. Then the second trigger changes it to Dropped because now the state is Dropped_Back (which is not Dropped). Once you get it to Dropped state, and click it, it changes to Dropped_Back, and instantly changes again to Dropped faster than you can see. That also explains why the subtraction doesn't seem to work. If you change the order of those triggers, it still won't work, it will just be stuck in the other state.
What you need is a trigger that change it to whatever state it isn't. But there are too many possible names for states for that to be practical. Fortunately, there is something built into SL that can do just that. If you create a T/F variable, you can change it using the toggle command, which means change it to whatever it isn't. Then you can use that value to change the state appropriately.
Related Content
- 29 days ago
- 4 months ago
- 9 months ago
- 7 months ago
- 7 months ago