Is it possible to script a puzzle in which a single button needs to be pushed a certain number of times before it opens a door, destroys or spawns an object? it falls just outside my current scripting experience
And thanks in advance.
Thanks for the input Grimwold.Grimwold wrote:The trouble with using a counter in this way is that the player could simply spam the button until the door opened and not need to know exactly how many times to push the button.
If you didn't want that to happen you could perhaps have the counter count up and use a timer for a very short delay, after which it would check the value of the counter.. if it matched the predetermined value, the door would open. If it was higher or lower then the puzzle would reset.
so each button push would
* increase the counter
* reset and start the timer
the timer would
* trigger a script to check the counter value
Your solution is so clever!Grimwold wrote:The trouble with using a counter in this way is that the player could simply spam the button until the door opened and not need to know exactly how many times to push the button.