Forum Discussion
if then
Hi,
I need some help with IF then triggers for self reflection. I also need to add to the triggers that if the user selects a certain combination it will take them to a new page for support. I attached my file any support is helpful.
Thank you,
Michelle
- JudyNolletSuper Hero
These tips might help:
- To allow only one choice among multiple buttons, put the buttons into a button set. Here's more info: https://community.articulate.com/series/articulate-storyline-360/articles/articulate-storyline-360-user-guide-how-to-work-with-button-sets
- Don't add a trigger to change an object to Selected (or Visited) when it is clicked. There are built-in functions to switch to those states. Triggers that duplicate those functions can cause problems.
- To branch to different pages, the Next button will need multiple triggers with conditions based on which buttons are selected.
- Here's more info about trigger conditions: https://community.articulate.com/series/articulate-storyline-360/articles/articulate-storyline-360-user-guide-how-to-work-with-triggers#conditions
- Avoid treating a group like a button. That often leads to problems—and definitely leads to more triggers than necessary.
- For example, instead of a group containing a rectangle and an icon, use just the rectangle object. While in Edit-States mode, you can insert the appropriate icon directly into the state(s). It will look the same as the group, but it'll only be one object in the Timeline.
- Give meaningful names to all of your objects (as well as to any as layers, animations, and variables). That will make programming and troubleshooting much easier.
This post might provide some guidance: TIP: Track Responses to Custom Questions or Surveys - Articulate Storyline Discussions - E-Learning Heroes
- PatrickNevison-Community Member
Hi
Here's one approach.
This uses 2 sets of Radio Buttons (Insert > Input > Click a style > click and drag onstage to draw).
These seem ideal for your use as they have the integral behaviour of mutually exclusive selection (click one, the other is deselected automatically), so you don't need to write any triggers to control them.
All of the code is attached to the 'Process my choices' button. The first two triggers make sure the learner has made selections. If one or both radio buttons are not selected, these triggers will show the layer 'no choice made' and prompt the learner of their error.
The third trigger checks to see if 'agree1' AND 'agree2' are selected. If this is true, the player jumps to slide 2.
The last trigger checks to see if 'disagree1' OR 'disagree2' are selected. If this is true, the player jumps to slide 3.
Hope this is of some help.