Retain toggle selected

I have made a toggle button on 4 objects. The learner can choose between 1-4 of them before continuing. However, when I return to the page the objects they selected are back to normal.


What is the action that is needed to ensure the ones selected retain?


thanks

Discussion (1)

You would need a variable to save which objects were visible when the user leaves the page:


Create a variable, e.g. "obj_visible".


Add two actions to each of your objects:


On: Show

Action: Modify variable

Target: obj_visible

Type: Add to variable

Value: a (for the first object, "b" for the second etc.)


On: Hide

Action: Modify variable

Target: obj_visible

Type: Subtract from variable

Value: a (for the first object, "b" for the second etc.)


Add 4 actions on page level:


On: Show

Action: Show

Target: Object 1


Condition:

If "obj_visible" Contains "a"


Else:

Action: HIde

Target: Object 1


Repeat this action for each object and change the targets to Object 2, 3, 4 and the Condition to "b", "c", "d"


Tim

Discussions have been disabled for this post