Explore the community Forums Lectora Inspire Tools Questions & Answers Using Variables for Object Show Trigger

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #407997 Score: 0
    Profile photo of Ryan Carlson
    Ryan Carlson
    Member
    beginner
    intermediate
    friend finder
    curious george
    wise owl
    contributor
    picture perfect
    profile
    1 pt
    @rcarlson8673

    Hello,

    I am new to Lectora, and I am not all that great with variables. I thought that I had understood variable management and how to trigger an object to show, but it did not result in success after a lot of troubleshooting.

    Let’s say you have a page that has an inherited (from title) hidden object. Also on this page, you have three audio clips. One audio clip that plays on launch of the page and two others that are triggered by clicking two buttons.

    If I wanted to only show the hidden object only after all three audio clips done playing play, how would I go about this?

    What I attempted did not work. What I did try was:

    I created three variables to correspond with the three audio clips.
    Variable Audio 1 = Value of 0
    Variable Audio 2 = Value of 0
    Variable Audio 3 = Value of 0

    Object inherited to page that I want to display after three audio clips are done playing = initially hidden
    Audio Clip 1=
    Action: On Done Playing then Modify Variable Audio 1 – equal to = 1

    Audio Clip 2=
    Action: On Done Playing then Modify Variable Audio 2 – equal to = 1

    Audio Clip 3=
    Action: On Done Playing then Modify Variable Audio 3 –  equal to = 1

    Finally, action I set to the is set to make the object display on the page only after all three variables are set to 1… so…

    Page with all audio and inherited object on it –
    On Show – Do Nothing, if conditions set to Variable Audio 1 Equal to 1, Variable Audio 2 Equal to 1, and Variable Audio 3 Equal to then show object that is initially hidden.

    I don’t know if I’m totally just not understanding the fundamentals of how variables work, but I thought this would do the trick… I apologize if I’m just a babbling idiot.

    Any thoughts of an easier solution or how I may have tripped up??

    Thanks,

    Ryan

    #408013 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    251 pts
    @timk

    I don’t think you can have an action doing nothing, it should either throw an error or it won’t be added to the page at all. An On: Show action on page level is run once when the page is loaded, so it cannot be used to do something on the page later on. It can be used to show the object when a user returns to the page.

    Your conditions and use of the variables should be correct, you just need another trigger. Add a second action to each of your audios

    On: Done Playing
    Action: Show
    Target: Your object

    … and use the same conditions (if “audio1 = 1 AND …)

    This post has received 1 vote up.
    #408019 Score: 0
    Profile photo of Adam Cain
    Adam Cain
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    Group Member
    curious george
    contributor
    3 pts
    @cainam

    I agree with Tim’s solution as the preferred.  If you wanted to keep everything as you have it, then instead of having the action on the page: on ‘show’, ‘show’ object, (with conditions) you would need to change to:

    on ‘timed interval’, ‘show’ object, (with conditions).

    #408037 Score: 0
    Profile photo of Ryan Carlson
    Ryan Carlson
    Member
    beginner
    intermediate
    friend finder
    curious george
    wise owl
    contributor
    picture perfect
    profile
    1 pt
    @rcarlson8673

    Tim’s solution worked perfect. Thanks for explaining to me why mine wasn’t working… Appreciate both of your help.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.