Forum Discussion

ClaudeFillion-e's avatar
ClaudeFillion-e
Community Member
2 months ago

Button reset

We'd like the mission menu to reset to Normal status after a failed mission, by clicking on Restart.
We've already tried several ways of doing this, but to no avail.
Does anyone have a miracle solution?
Thanks in advance.

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    Sorry Claude, I dont read French so its very difficult for me to understand whats going on in the Storyline file you sent.

    However, if you just want the Menu page to reset when all missions are complete but the Result is failed, then you can still use the T/F variable method.

    Simply create a T/F variable called "MissionFailed", and have it set to FALSE by default.

    Set this variable to TRUE at the correct time when the user fails Mission 7.

    On your MENU slide, you can have a trigger to reset everything if they fail. This trigger would look like;
    Change State of MISSION 1 BUTTON to Normal when the timelines starts on this slide IF <missionfailed> = TRUE.

    Do this for the remaining two mission buttons and you now have a working reset.

    NOTE - You dont specify whether the user can complete the three Missions in whatever order they want? If they have to do them in order 1,2,7 - this solution will work as is.
    If however, you want them to be able to do whatever order they want, then you will need some additional triggers and variables to hold the value 0/1/2 for each question:
    0 = unattempted (default)
    1 = failed
    2 = passed

    Is that any better help?

    • ClaudeFillion-e's avatar
      ClaudeFillion-e
      Community Member

      Your proposal works very well.
      You add sunshine to my day!
      Thank you so much!

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    Bonjour Claude!

    Its not quite a miracle, but to get this to reset should be quite straightforward.

    How I would do it, is firstly, set your MENU slide properties to "Reset to Initial State" When Revisiting

    Then set up a simple T/F variable for each mission.

    At the start, set all 3 variables to FALSE.
    When the user gets the mission correct, set the variable to TRUE.

    Finally, add a trigger to the MENU slide which says
    Change state of MISSION1 BUTTON to State "Completed" when Timeline Starts on This Slide

    And if you copy that same trigger for MIssion 2 and 7 buttons then this should work great.

    The slide will show if the missions are complete, but if not, then the button will stay shown in the "Normal" state.

    Does this help at all?

    • ClaudeFillion-e's avatar
      ClaudeFillion-e
      Community Member

      I've already tried this solution.

      In addition, this method doesn't exactly match the desired behavior, since we return to the menu after each mission. We want the menu page to reset only when all missions have been completed and the result is failed.

      You can validate this yourself in the file I attached in my last message.

      Thanks for your help