Creating conditional action for clicking a button twice
I want an action to happen when the learner clicks a button ONCE. I also want a different action when the learner clicks the same button TWICE. How can I do this with a conditional action?
I want an action to happen when the learner clicks a button ONCE. I also want a different action when the learner clicks the same button TWICE. How can I do this with a conditional action?
Conditional Actions have sections called Decision Blocks, each of which has a condition that must be met in order for the actions underneath it to be executed.
So in your case you would need three decision blocks and you'll also need a counter variable that is set to 0 by default.
The first decision block has a dummy condition (as you stated above) that will always be TRUE. IF 1 is equal to 1 is a good example of a dummy decision.
The action underneath this dummy condition should be to INCREMENT your counter variable by 1. (You can also use an EXPRESSION action but that's a little more complex.)
This INCREMENT action will always be executed every time the Conditional Action is executed.
Your next Decision Block's condition checks the value of your Counter variable and if it has been set to a value of 1 at this point then it will execute whatever action you deem appropriate for that.
Your third Decision Block's condition checks the value of the Counter for a value of 2 (meaning it has been incremented twice) and if so executes a different action of your choosing.
You could keep going this way almost indefinitely specifying differing actions for different values of the counter. However, at some point you may want to use a different action to reset the counter again. For example, you may have a Decision Block at the end of the sequence in this same Conditional Action that will check the Counter variable and if it has reached a certain number (e.g. three) then will reset it back to 0 or 1.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.