State changes with a variable

Mar 26, 2015

I have created a basic keypad for users to click on the numbers and they appear in the display.

as I'm building a course on adding wrong meter reads I have build it to when the user clicks on the number 8 that the number 7 is imputed and want to see if they notice... if they don't and press the enter key it goes to a slide layer saying what happens to a customers bill if information is wrong..

but I don't want people going about saying the elearning is not working correctly so I want it to if they press the number 8 again it will input that number so I've tried building a trigger as follows

 

change state of box number 1

to state of 7 if the user clicks box 8

(this is how I have done the first part and that works fine)

 

I'm then adding another trigger saying

change to state of 8 if user clicks box 8 if the state is equal t0 state 7 but for some reason this is not working..

anyone able to help... I've tried to explain this the best I can lol  

3 Replies
Joanna Kurpiewska

Hi Graham

I just had a look at your example.

1. It's more comfortable to call the states by custom names like 7 or 8 in your example rather than using visited and down.

2. Create a new variable e.g. clickCount and set it to 0

3. Add a trigger: add 1 to clickCount when user clicks button/shape8

4. Then add a condition: change state of box7 to 7 when user clicks shape8 if clickCount =1 and one more change state of box7 to 8 when user clicks shape8 if clickCount =2

Have a look at the attached files- it works the way you wanted :)

 

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