Forum Discussion

HeatherBarlow's avatar
HeatherBarlow
Community Member
12 months ago

Help with interaction on slide

I am working on a puzzle interaction for an e-learning module and I am really stuck on how to make this work. 

What I would like it to do: 

I want the user to be able to enter in a "phone code" to get to a customer service rep. I have a specific 'code' that I made up for the answer. I don't know how to set up I am guessing variables to make this work. 

When the user selects the code 357#, the correct layer should show and then they can move on. 

If they select any other combination of numbers, then it is wrong and they should get the incorrect layer. 

I will also need to account for how many times I want them to be incorrect before I stop the user. For example, after 2 incorrect attempts, I give them the first number, after 4 incorrect attempts, the first and second numbers. Then after the 5th incorrect attempt, give them the answer and move on. 

How do I get this set-up?

This is part of an overall "escape room" type activity so it isn't really about the code and it is designed to be a challenge to slow them down. The rest of what I have put together will deliver the learning message.

  • The challenge with this is knowing when the number selected is the first, second and third.

    I'd probably have three layers for each number with a tracking number variable:

    • hundred
      • varHundred = [1 = 100]
      • show layer ten when varHundred changes 
    • ten
      • varTen = [1 = 10]
      • show layer one when varTen changes 
      •  
    • one
      • varOne = [1 = 1]
    • Add the variables together
      • TotalVar
      • Add VarH to Var
    • Assuming they need to enter # at the end, this could be the submit button that does the adding. Otherwise, the submit button could add the variables. You should end up with a value up to 999 and the # sign. You can evaluate that to display correct/incorrect.

    Side note: since you're using a phone image, I'd probably not use a submit button since phones don't have a submit. Perhaps the # is the submit.

     

     

     

  • My layers approach above isn't the way I'd go. ")

    I was playing with some ideas and I'd use a counting variable to track if it's a first, second, or third press. And then from there, add 100, 10, or 1 to the variable.

    This also begs the question: is the juice worth the squeeze.

    It's easier to get them to enter a number 357 in an entry box and evaluate than it is to get them to punch in three numbers on a phone. Unless of course you're teaching how to enter a code on a phone.