Need Help Setting a Condition to Display a State

Hey guys. I have built an interactive guitar in my learning guitar e-learning course. I have just done a section on reading notes in tablature. I have then set a task for the user to play a short section of notes. I want it to display a well done box when they complete it. However, the user must press 7 buttons (notes) in a set order to display the box. If they press any other button I want it to display another box that says Try Again. In normal computing coding this is a very simple If statement, but I can't work out how to do it in SL2. I've attached a screenshot of the slide to get a better idea of what I'm working with. 

6 Replies
Jordan Defty

Infinite attempts. The buttons are in the slide image above (blue, green, red, white, black, orange). The correct order is listed in the tablature above. But I will write the order here for ease. The story file is also attached.

A6 = 5th row, 7th button

E6 = 6th row, 7th button

A3 = 5th row, 4th button

E3 = 6th row, 4th button

E4 = 6th row, 5th button

A6 = 5th row, 7th button

E6 = 6th row, 7th button

Wendy Farmer

Hi Jordan

i would try assigning T/F variables to the  7 correct answers - default false and triggered to true when user clicks them.

Create a Correct layer and a try again layer. 

Show correct layer when all 7 variables are true

Show try again layer when any of the 7 variables are not true.

I would test theory with just a couple of buttons to start with

Jordan Defty

The theory works. It'll do for the presentation, but if I was to make this into a fully fledged E-Learning course there would be more coding needed in order to get it to strictly only say Well Done if they were played in the correct order. However, this works just fine for the purposes I need it for so thank you very much! What did you think of the presentation by the way? If you looked at all of it that is. I'm sort of new to this stuff haha.

Emily Ruby

Hello Jordan! Welcome to Heroes, and glad Wendy was able to assist you here!

I took a look at the file, and just a note, in the Multiple Choice quiz, you will need to edit multiple choice, and set the attempts to Unlimited if you want the user to be able to retry. Right now they are set to 1 attempt, so the trigger to try again is directing back to the same slide, but they cannot try again.

Hope this helps!