timers need help?

gamemaker
can i make a timer when you enter a pathit count down before you can go to the next room you have to wait a certain amount of seconds before you can go to next room

Arbutus
Yes! When the player enters the room (room script), destroy the exit and enable the timer. When the timer is done, create the exit and disable the timer again.

francisstokes
Yeah add something like this to your "when player enters" script:


'this is your timer.you add this to your code under the rooms.
'-----------------------------------------------------------------
define timer <timer>

'the player is going to wait 3 seconds (you can change it if you want)'for the exit to open.

interval <3>

'this will create an exit north from room1 (the room with the exit,
'change the name!) to room2
'(the room the player exits to, as before, change the name!)

action create exit north <room1; room2>
disabled
'------------------------------------------------------------------




'you put this code in "room1"

script timeron <timer>

'timer is the name of your timer (you have to change that)


And its as simple as that.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums