Since "green" is disabled, the click on it won't be registered, this is why the order that you've posted, still works.
I would do it like that (although there are other solutions aswell):
I've made 2 integer variables:
red, yellow
(you can call them differently, it's your choice; if you use different names, you must replace the names in the codes)
The player has to click in this order: red, yellow, green.
In the red hotspot, add this to the Advanced Tab of the Hotspot Properties:
- Code: Select all
red = 1
yellow = 0
(Red is the first hotspot that must be clicked by the player)
In the yellow hotspot, add this to the Advanced Tab of the Hotspot Properties:
- Code: Select all
If red = 1 Then
yellow = 1
Else
yellow = 0
End If
(Yellow is the 2nd hotspot that must be clicked. The click on it should only count, if red has already been clicked, otherwise yellow must remain 0)
In the green hotspot, add this to the Advanced Tab of the Hotspot Properties:
- Code: Select all
If red = 1 and yellow = 1 Then
Action.GoToFrame "Frame_Name"
Else
red = 0
yellow = 0
End If
(if the player has already clicked red and yellow, the puzzle is completed by the click on green, and the player can go to the next frame.
If red or yellow have not been clicked yet, or the player has clicked them in the wrong order, the player has done it wrong, and therefore red and yellow must become 0, and the player has to "start over" with the puzzle).
Please test this code, and let me know if there's still something wrong
