Number items when selected in any order
Mar 13, 2017
Hello!
I have a game where learners need to locate objects in a room and click on them in any order. Once they've located the item, I want the visited state of that item to include a little placard with the # of the object. So the 1st item found would be 1, 2nd would be 2, etc. I created an Objects number variable, and have a trigger that adds 1 to it each time one of the objects is clicked, and then I put a reference text box to the variable on the placards in the visited state. See where this is going? :) First one works just fine - but then after a 2nd item is found, both placards read "2" - all the way up to the total # of objects!
How can I adjust this so the value on the previous placards stay the same, and each subsequent object found displays their placard value by +1? Looking for a creative solution. Thanks!
6 Replies
Add a disabled state to each clickable object
You can use an number variable for each item and a variable to track the number of clicks.
Add a reference for each individual object to the object
add a trigger to each object to increment the number of clicks each time they are pressed as long as it is not equal to disabled.
add a trigger Assign the value of the number of clicks to the individual variable for each object when the user clicks if it is not equal to disabled.
Add a trigger to set the object to disabled.
Do it in that order and it should work.
I built something like this for a client a couple of years ago.
Why the disabled state? If all objects start disabled, they can't be clicked...
Sorry if I didn't explain that, just add the disabled state, they all start off as normal but get changed to disabled. This way you cannot add any extra on. I can drag out the client version I built and send over but will need to remove some stuff from it first.
Sent from my iPhone
oh I see - so it can't be clicked again. Makes sense. Let me see what I can do - thanks for the idea!
Yay! It worked! I never had reason to assign the value of one variable to another - now I know how beneficial it can be! Thanks so much for your help!
Glad you got it working!
Sent from my iPhone
This discussion is closed. You can start a new discussion or contact Articulate Support.