How to add a counter to the text entry of number of incorrect answers?

Problem:
I am creating a very simple 3 slide quiz where on each slide I have one freeform text entry where user has to answer by inputting the specific text "YES".
the slide also has 5 green boxes - serving as a visual counter of wrong attempts. each time user types the wrong answer "anything other than YES" the green box turns red (i.e user is shown layer where the box is red in an array of boxes.)
User has 5 attempts, on the 5th - the correct answer should show.
If user has answered wrong
Here is what i did:
used graded question option to insert slide. 
added 5 layers - named them try1 through try 5.
on each layer i placed 5 boxes with insreasing number of red boxes, until on layer try 5 all are red.
I also added a correct answer on the same layer and button continue to the next slide.
here are no issues
ISSUES are when i am trying to use triggers.
The variable was automatically created  and was named Textentry
the trigger used ( 5 triggers)
Show Layer try2 when TextEntry changes, ifTextEntry is equal 2
I know i am doing something horribly wrong :)
need help please, variable/counters are not my strength.
Basically i need to know how to add/count the number of unsuccessful attempts used in a TextEntry field of the quiz - show "progress" , and display different layer at each time and show correct answer on the last one and move on to next slide when 5 attempts are reached by pressing continue button(this one i know)

7 Replies
Wendy Farmer

Hi Medhi

hard to say what's happening with your file without seeing the setup so I have created a sample of what I think you are trying to achieve...

I've only done triggers for the first two attempts - see if it is what you are after. Here is a quick peek of it working

Mehdi Kasumov

Thank you so much Wendy, this is a really great help, it is exactly what I was looking for, to make sure that when user enters the wrong answer he is directed to the "wrong/try again" layer and the state of the box changes to a different color like in any game, I have to figure out how to create a trigger that will after 5th, nth attempt show correct answer.

Ned Whiteley

Hi Mehdi,

In the example I was originally going to post, I have four red lights for the first four incorrect responses, which are driven by visits to the Try Again layer. When the fifth attempt is incorrect, the user is jumped straight to the Incorrect layer, which I edited to include the correct answer in its text (see attached). No extra triggers are required because the Incorrect layer is automatically shown after the final failed attempt.