Forum Discussion
How to set up an end trigger with hotspots
I have created an Escape Room game that uses hot spots to take the user to various drag and drop slides. Once completed, the player returns to this main page.
How do I set up a trigger so that when all the hot spots have been completed, the game ends? I want to add an additional layer so that when the end is triggered, a video plays in effect letting them out of the room.
Since hotspots don't have states, you'll have to use variables to track whether they've been clicked.
- Create a T/F variable for each hotspot, with a default value of false.
- Add a trigger to each hotspot that changes the corresponding variable to True when the hotspot is clicked. Be sure this comes before the trigger that jumps to the drag-and-drop slide.
- On the main page, add a trigger that shows the special layer when the timeline starts on the slide, with conditions that all of the variables = True. (That trigger will run every time the user returns to the slide. But it will only perform the action when the conditions are met.)
If you use transparent shapes with Visited states instead of hotspots, the condition on the trigger to show the special layer would be that all those objects are Visited.
Here are some related posts that might help:
5 Replies
- NikkiClaytonCommunity Member
Judy, you are indeed a super hero today. Thank you so much for such a quick and really useful reply. I will go through everything you have suggested and hopefully my issues will be resolved.
- JudyNolletSuper Hero
You're welcome! Pay it forward when you can. 😊
By the way, the solution in my previous reply assumes that the person can't return to the main page until they finish the interaction associated with a hotspot.
If there is a way for them to get back to the main page before finishing the interaction (for example, there's a PREV button, or the built-in Menu is showing with the main page), the method needs to be altered a bit. In such a case, you'd still use T/F variables to track completion of that segment. But instead of changing a variable to True when the hotspot is clicked, change it True whenever the interaction is completed.
- NikkiClaytonCommunity Member
Thanks Judy. I ended up using transparent shapes and changing the states which has worked perfectly, thank you. Users cannot go back without completing the drag & drop task.
- JudyNolletSuper Hero
Since hotspots don't have states, you'll have to use variables to track whether they've been clicked.
- Create a T/F variable for each hotspot, with a default value of false.
- Add a trigger to each hotspot that changes the corresponding variable to True when the hotspot is clicked. Be sure this comes before the trigger that jumps to the drag-and-drop slide.
- On the main page, add a trigger that shows the special layer when the timeline starts on the slide, with conditions that all of the variables = True. (That trigger will run every time the user returns to the slide. But it will only perform the action when the conditions are met.)
If you use transparent shapes with Visited states instead of hotspots, the condition on the trigger to show the special layer would be that all those objects are Visited.
Here are some related posts that might help:
Related Content
- 7 months ago
- 2 months ago