Let me ask you: What do you understand under animated numerical puzzle? Would you like to have the numbers on the suitcase, and every time you click a number, it will increase (e.g. from 0 to 9)? And the player has to match the digits with the required code numbers?
If so, I would try to make an integer variable for each of the digits of the code, decrease them with every click, and display for every value another hotspot picture with the corresponding number. And when the number is correct it should have the value of 1 for example.
Sorry, just thinking loud since I haven't tried to do such a thing yet just planning to use it aswell, and I'm not very experienced with scripting. I'll try out something tomorrow (it's already very late here), and post if I have a more detailed idea that might work...
But I'm conviced that ShadowHunter would come up with a very elegant solution within minutes, lol
EDIT:
Yes, my idea works, but it's probably not a very elegant way of scripting it.
Anyhow, here is what I have done for a 3-digit lock. I've created 6 integer variables (maybe it would also work with only 3, I'm not sure): Digit1, Digit2, Digit3, Lock1, Lock2, Lock3. I've added 10 digits as hotspot images to the project (0.GIF, 1.GIF ..... 9.GIF).
I've loaded 0.GIF as image for all the 3 hotspots of the lock.
For the first lock that should have the value 5 if the player does it correctly, I've added the following code to the advanced tab of the hotspot properties:
- Code: Select all
Digit1 = Digit1-1
If Digit1 = -1 then Action.LoadAPicture Hotspot(1), "1.GIF"
If Digit1 = -2 then Action.LoadAPicture Hotspot(1), "2.GIF"
If Digit1 = -3 then Action.LoadAPicture Hotspot(1), "3.GIF"
If Digit1 = -4 then Action.LoadAPicture Hotspot(1), "4.GIF"
If Digit1 = -5 Then Action.LoadAPicture Hotspot(1), "5.GIF"
If Digit1 = -6 then Action.LoadAPicture Hotspot(1), "6.GIF"
If Digit1 = -7 then Action.LoadAPicture Hotspot(1), "7.GIF"
If Digit1 = -8 then Action.LoadAPicture Hotspot(1), "8.GIF"
If Digit1 = -9 then Action.LoadAPicture Hotspot(1), "9.GIF"
If Digit1 = -5 Then
Lock1=1
Else
Lock1=0
End If
I did similarly with the other two locks.
Then I created a hotspot over the handle of the suitcase, and added the following code:
- Code: Select all
If Lock1+Lock2+Lock3 = 3 Then
Message "You opened the chest."
Else
Message "It's locked."
End If
The question is still what happens after the player has reached the digit 9 on the lock: Should it go to zero, or get "stuck" on 9 (and a hotspot image of 0.GIF loaded when the player leaves) etc.
Well, this is probably a too complicated way, but it works
You could still wait for ShadowHunter's idea.