Forum Discussion
Storyline Menu Topping Game- Variables & Triggers
Without the details and given what you said you have working, for simplicity I would suggest a T/F variable for each topping to indicate if it is in use (I assume it is either on or off the pizza). Then, you can adjust the topping as needed (with triggers or scripts). For example, you could show or hide it, or play assigned motion paths according to the value change of each topping variable.
As for layering in the correct order, if you are using slide layers, then the last shown layer will always be on top. Since it is cumbersome to show the layers in a specific order other than how you placed them on the slide, then different layers for each of 16 toppings is probably out.
I would suggest placing all the toppings on one layer, in whatever order, and setting up a variable to hold a list of the current topping order. This would be easiest if you used something like a JavaScript array and a small script to adjust the order whenever the learner clicks to add or remove a topping. Then, you can quickly cycle through each topping slide object, which you can access using the object() function of the Storyline JS API.
https://www.articulatesupport.com/article/Storyline-360-Advanced-JavaScript-API
For each topping, you can adjust the property object([id]).depth, which sets the stacking order of the objects on the slide (at least within the layer that the objects are on). Using the variable array holding the list of topping orders, you can just assign each order in the list to the corresponding topping, which will shift it in front of or behind the other toppings. You could do this before or after any animations or motion paths if desired.
Tracking these variables should allow you to add and remove toppings as many times as needed, before clicking submit.
Of course, you would need to adjust this to fit your particular design.
Related Content
- 10 months ago
- 7 months ago
- 10 months ago
- 10 months ago
- 10 months ago