Skip to main content
steve91586674
Inspiring
January 3, 2017
Answered

Using buttons and Advanced Actions to change slides

  • January 3, 2017
  • 5 replies
  • 725 views

Hi,

I'm building a multiple choice interaction. What I want to happen is that the learner can make two wrong choices on the slide before the project automatically pushes them back to an earlier slide that describes the information they're being tested on. What I currently have is a button next to each MC answer. I've set up a variable and an advanced action that if the variable reaches 2, then the project jumps to the information slide. I have set up each of the buttons so that its action is an increment of 1 of the variable when the user clicks on it and the variables starting value is 0.

However my interaction isn't working. I click on two of the buttons and nothing happens. Can anyone help?

Thanks.

    This topic has been closed for replies.
    Correct answer Lilybiri

    I don't see how the variable is incremented? You have first to increment the variable, which can be done with a first decision that is always executed, like:

       IF 1 is equal to 1

          Increment v_pushback by 1

    Second decision will then check the variable:

       IF v_pushback is equal to 2

         Jump to slide...

    Make sure that this action is triggered by all wrong hotspots. Set the pausing point of all hotspots to the same location.

    IF you want to offer the possibllity to retake the question slide when returning back to it, use the On Enter action of the slide to reset the user variable to 0. Be also careful not ot use the name of the variable for anything else, I prefer to identify the variable by a name starting with 'v_'.

    5 replies

    steve91586674
    Inspiring
    January 17, 2017

    Thank you all very much for helping. I've gotten this to work now. There was an error in the logic (of the user) as I went through and tried to do this the first times.  I'm new to Captivate and have been struggling to figure out variables and advanced actions. Lily, Justen, and Kyle, I really appreciate your assistance and patients.

    Unrelated but part of what I was screwing up initially, what do the Increment and Decrement  actions do for the On Enter and On Exit actions? Is it possible to do what I laid out above using just those actions?

    Lilybiri
    Brainiac
    January 17, 2017

    The On Enter event is only fired when Entering the slide, wouldn't have been useful for you, since you need it to fire when an answer has been chosen. The On Exit event is not recommended for use at all, one of the reasons being that it only fires when the last frame of the slide is indeed visited. That will not happen if you have an interactive object pausing the slide, and jumping to another slide when clicked, because the inactive part of the object timeline will be skipped in that case, and never be visited. More about (the easily accessible) events:

    Events and (advanced) Actions - Captivate blog

    As for understanding the Timeline I recommend to read a sequence of 5 blog posts which I started recently, 3 have already been published:

    Captivate's Timeline(s) Demystified - Intro - Captivate blog

    steve91586674
    Inspiring
    February 4, 2017

    Wonderful! Thank you Lily!!

    Justenuf2bdangerous
    Inspiring
    January 4, 2017

    I'm going to restate this as I understand it, so my answer is based on the following:

    1. This is a custom built question slide with multiple selections - only one is right

    2. If the user selects the correct answer, the project will advance

    OR

    if user selects incorrectly twice, the project branches to a remediation slide.

    Kyle's answer using the IF/ELSE approach should work - you only use one variable (and as many text feedback as you need - one for each incorrect if you like)

     

    On entry, the variable is equal to zero.

    Selecting the correct answer would trigger the feedback for the choice and allow the user to navigate forward - no need for a variable there.

    Using the IF/ELSE trigger for every wrong answer - the first selection will check to see if the variable is equal to 1.

    Since it will not be equal to one, the ELSE action will fire - incrementing the variable by 1 and revealing the feedback for selected incorrect choice.

    This sets up the possibility of either selecting the correct choice (no impact on the variable) or selecting another incorrect choice.

    The second incorrect choice should fire the THEN statement and jump to the selected slide, since the IF statement will be satisfied by the previous incorrect choice having incremented the variable to a value of 1.

    Check to make sure the variable is incrementing by placing a text box for containing the variable on the slide ($$variable_name$$) and then previewing in the browser. it should show up as zero, then change to 1 when you make the first incorrect choice.

    If it does this and still doesn't jump directly to the remediation loop when you select the next wrong answer, the only thing that could be in the way might be some type of pause you've got built into the slide that is stopping the action from firing.

    Built it and it ran perfectly using the above logic:

    Capture

    steve91586674
    Inspiring
    January 3, 2017

    Correct, it is not a default MCQ slide but one built with standard objects. This is just a quick mockup of how I want it to work. Thanks.

    elearningcanada
    New Participant
    January 3, 2017

    Yes, so if you set it to "is equal to 1" then it will fix your problem. Because the first click is =0 the second click is =1.

    Kyle.

    steve91586674
    Inspiring
    January 3, 2017

    Thanks, Kyle. I tried setting it up as you suggested, but it still isn't jumping back to the previous slide as I'd hoped.

    elearningcanada
    New Participant
    January 3, 2017

    You have to set the check to "If VAR = 1". Because what happens is the first click it checks if the Var = 2, which it isn't. It is 0. Then I assume it increments by 1. The second click then checks if Var = 2, which it isn't, it's now 1.

    Just a logic problem, I think. I could be reading this wrong though. I agree with Lilybiri, if it isn't this, share the code and it should be easy to figure out.

    Thanks,

    Kyle.

    Lilybiri
    Brainiac
    January 3, 2017

    You mean it is not a default MCQ slide but one built with standard objects?

    Can you show the advanced actions?