Your first Storyline-style trigger: the sentence, Otherwise, AND and OR
A ten-minute tutorial for Storyline designers: build a button that checks a variable, does one thing if it is true and another Otherwise, and read the trigger back as a sentence. Then join conditions with AND and OR.
Last updated 6 min read
I know Storyline triggers. Where are they here, and where did Else go?
Step by step
Make a variable
Click Variables on the toolbar, then Add Variable. Name it
ReadPolicy, type boolean, starting value false.Add two buttons and a layer
Add a Button labelled "Read the policy" and one labelled "Continue". In the Layers tab add a layer called "Not yet" with a text box on it, and set it to Starts hidden.
Set the variable
Select "Read the policy". In Triggers, click Add Trigger, then click the new sentence to open it. Change Then to Set variable →
ReadPolicy→true.Add the condition and the Otherwise
Select "Continue" and add a trigger. Keep Go to next slide. Click Add a condition (only if…) and pick
ReadPolicyis true. Under Otherwise, click Add an Otherwise action and pick Show layer → "Not yet".Try it
Click Preview. Click Continue first: the Not yet layer shows. Click Read the policy, then Continue: you move on.
What you'll build
One slide with a Continue button that only lets the learner on after they have clicked Read the policy. If they try too early, a layer tells them why. It is Storyline's classic "if/else" trigger, built in about ten minutes.
You need a Scenes course. From the dashboard, click New course, pick Blank Scenes, and click Create course. Or open the Storyline triggers playground template, which has this slide built already.
Where triggers live
Triggers belong to objects, as in Storyline. Select an object on the slide, then open the Triggers tab in the Properties panel on the right.
Each trigger shows as one line, a sentence: When user clicks → go to the next slide. Click the sentence to open it. Inside you'll find four parts, the same four Storyline's trigger wizard has:
- When: the event. Click it for a searchable list. Type "key", "drag" or "touch" and it narrows down.
- Only if: the conditions. Optional.
- Then: the actions, run in order. A trigger can have several.
- Otherwise: Storyline's Else. It appears as soon as the trigger has a condition.
Close the trigger by clicking its sentence again. The sentence is how you check your work: read it out loud. If it says what you meant, it is right.
Tip: Prefer a diagram? Flow View, at the top of the Triggers tab, shows the same triggers as boxes and arrows, with the same fields.
Step 1: make the variable
Click Variables on the toolbar (or press ⌘K and type "variables"). Click Add Variable. Name it ReadPolicy, set the type to boolean, and leave the starting value at false.
Why a variable? A layer or a state only remembers what is on screen. A variable remembers what the learner did, across slides, and it is saved with their progress in a SCORM package.
Step 3: set the variable
Select "Read the policy". In the Triggers tab, click Add Trigger. A new sentence appears: When user clicks → go to the next slide. Click it to open it.
Under Then, click the action and type "set". Pick Set variable, choose ReadPolicy, and set Value to true. Close the trigger. The sentence now reads When user clicks → set ReadPolicy to true.
Step 4: the condition and the Otherwise
Select "Continue" and click Add Trigger. Open it. Leave Then as Go to next slide.
- Under Only if, click Add a condition (only if…). Leave the type as Variable, pick
ReadPolicy, and set it to true. - Otherwise appears below. Click Add an Otherwise action, pick Show layer, then "Not yet".
Close it and read the sentence: When user clicks → go to the next slide · if ReadPolicy is true, otherwise → show layer Not yet. That is one trigger doing what took two in older Storyline courses.
Tip: Your slide needs a second slide to move on to. Click Add Slide in the slide panel if you have only one.
Try it
Click Preview in the top bar. The course opens in a new tab in the real learner player.
- Click Continue first. The "Not yet" layer shows.
- Click Read the policy, then Continue. You move to the next slide.
If nothing happens, open the trigger and read its sentence again. Anything it points at that no longer exists shows as "(deleted)" in red.
AND and OR
Add a second condition and a small AND / OR switch appears between the two. Click OR to change it. Each condition joins the one before it, so you can mix them, exactly as in Storyline.
AND binds tighter than OR, again as in Storyline: "A and B or C" means "(A and B) or C". The sentence shows the grouping, so read it back if you are unsure.
Conditions can test a Variable, an Object state, whether a Slide has been visited, whether a Layer is showing, or an Input value (what the learner typed or ticked).
The order triggers run in
When an event happens, the object's matching triggers run top to bottom. Each one checks its conditions against what the triggers before it left behind. That is the same rule Storyline uses, so the old trick of putting the "set variable" trigger above the "check variable" trigger still works.
The preview and the exported SCORM package run triggers with the same code, so what works in Preview works in your LMS.
Part of the documentation: Build.
Found something here that does not match what the product does? That is a bug in the guide — see all guides or tell us from the Help Center.