Forum Discussion

MichaelPalmer-0's avatar
MichaelPalmer-0
Community Member
4 months ago

How to Change the State of an Object From a Different Scene

I need help changing the state of an object from a different scene.  At the beginning of the training, the title scene will have two buttons.  Button 2's default state is disabled, forcing the user to select button 1, taking them to a different scene.  On the final slide of this scene, there is a button (title slide button) the user will click to return to the title slide, at which time I want the state of button 2 to change to normal.

I tried to use a True/False variable on the final slide to change the state of button 2, but it didn't work.  I've also tried to search the community for an answer to this and couldn't find it posted.  I feel like I'm probably overlooking it.  If so, please tag me in it or post a link in the response.  Otherwise ... please help! lol

  • SBP_Inc's avatar
    SBP_Inc
    Community Member

    Variable is half the solution. The slide with the button needs a trigger that changes state of the button (to disabled, or a custom state) based on the variable's value at timeline start.

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    Hi Michael,

    You were so close! :)

    You're absolutely right that T/F variables is exactly what's needed here. The only problem was that on your main menu slide, you used a "When Variable Changes" trigger... however if you think about it, this trigger will never work because when the variable actually changes, we arent on this menu slide - we are still on the last slide of the scene!

    So to make this work, simply change the trigger on your menu slide that says "When Variable Changes..." to:

    "CHANGE STATE of Button 2 to NORMAL when TIMELINE STARTS on this slide IF Variable1 = true"

    Thats it.

    P.S. name those variables! ;)

    Hope this helps!

    • MichaelPalmer-0's avatar
      MichaelPalmer-0
      Community Member

      Alas, you're a genius!  What you said makes sense ... now lol.  Thank you for your quick response