Forum Discussion
Please allow "watching" multiple variables in same trigger.
A technique I often use for this kind of logic is based on a JavaScript approach that can be easily replicated in Storyline with just a couple of triggers.
JavaScript Version
The following script checks if variables page1Seen through page5Seen are all true. Once they are, it automatically sets page6Seen to true.
function allSeen() {
const keys = ["page1Seen", "page2Seen", "page3Seen", "page4Seen", "page5Seen"];
const page6Seen = keys.every(k => getVar(k) === true);
if (page6Seen) {
setVar("page6Seen", true);
}
}
setInterval(allSeen, 250);
The key here is the setInterval function, which checks every 250ms (0.25 seconds). As soon as all five variables are true, the sixth is updated — no need for separate triggers. You only need the usual triggers to set page1Seen to page5Seen. The rest is automated.
Storyline-Only Equivalent
To replicate this without JavaScript:
- Add a shape off-slide.
- Create a motion path on that shape:
- Duration: 0.10s
- Distance: Any (e.g., 100px)
- Create these 3 triggers (in order):
Trigger 1:
Move shape on motion path when the timeline starts
Trigger 2:
Move shape on motion path when animation completes
(this loops it — acting like setInterval)
Trigger 3:
Set variable page6Seen to true
When animation completes if all other variables (page1Seen to page5Seen) are true
This setup acts like a ticking engine — Storyline’s version of setInterval. It continuously runs and checks your conditions every time motion path completes and we set it to very short time.
I've attached a Storyline file for you to explore if you're interested. The logic is simple and works well. To test the JavaScript version, disable the Storyline triggers. To test the Storyline-only version, enable those triggers and disable the JavaScript.
Related Content
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago