Forum Discussion

TaylerMarshall-'s avatar
TaylerMarshall-
Community Member
4 months ago

Button that doesn't appear until all remaining buttons are pushed?

Hi Everyone! Thanks for your help in advance - I could use your advice! I've been working on a jeopardy-style quiz game for a review of our new employee training, and I'd like to have a continue button hidden on the game board until all of the question buttons have been clicked (25 total). I feel like that's possible, but I'm just not sure how. Can anyone tell me how to do that? 

Also, can the continue button take them to a different slide depending on the participant's game score? I've setup a variable to keep track of the total points throughout the game, but if the participant answers every questions wrong, I'd like to either send them to the beginning to retake the course or to a bonus review section. Can anyone share with me how to make a "jump to" slide XYZ based on the outcome of a variable? 

  • You could do this a few ways using variables.

    One straightforward way is to have 25 Boolean variables (e.g., isButtonClicked_[NN]), one for each button, all starting as False.

    Have another Boolean variable (e.g.,  buttonClicked) to indicate that some button was clicked.

    For each button click, use a trigger to set isButtonClicked_[NN] to equal True.

    Next, use another trigger to toggle the value of buttonClicked.

    Add an on Variable Changes trigger for buttonClicked.

    Use this trigger to change the visibility state of your Continue button only if ALL of the isButtonClicked_[NN] variables are True (i.e., add 25 conditional lines with AND, checking if each variable is true.

    As for jumping to a specific slide, just create a trigger on clicking the Continue button for each destination. Specify the slide to jump to, when the user clicks on the Continue button, and a conditional to check if the score variable equals (or is greater or less than) some value. 

    • TaylerMarshall-'s avatar
      TaylerMarshall-
      Community Member

      Thanks Cary, I'm looking through to see what my questions are now. 

  • JustinDeuel's avatar
    JustinDeuel
    Community Member

    I'm not a fan of having that many variables, and generally just use a "Counter" var instead, and increment it each time a question is opened, and then at the end just check against what I know to be the number of questions (if counter = 25 in your case)

    It is rather hard coded, vs the "if ALL" option presented above, but if you know you're only going to ever have that set number of questions it's a lot easier to juggle 1 variable IMO. You'll still obviously need the triggers on each question, but you'd need that either way.