GMS 4.1: How to Use a Persistent Timer?

Channel:
Subscribers:
268
Published on ● Video Link: https://www.youtube.com/watch?v=tSW1SB58o-w



Duration: 0:00
17 views
0


GMX File: https://www.dropbox.com/scl/fi/p0x1ug24h8bt4onqzo8t7/timer_persis1.gmx.zip?rlkey=87dfggd5h00yqn3923m9pwr3u

Notes:

1. obj_timer

Check Persistent ////Place object in the first room where you want the timer to be, and that's it, no need to place timer in each room, just one room, and object will repeat for the other rooms. We need to do one more thing. We want the Timer not to be in the Game Over room. So we must deactivate it.

2. gameover

Events:

Create

Actions:

instance_deactivate_object(obj_timer); ///This line of code will deactivate timer and will not show in the game over room. obj_timer is the name I gave the object, needs to be that name. You can also do this for a Pause room too, but when you resume, you need a other object which is placed in the room, where you want the timer to be, and have this line of code in Actions for Create Event, instance_activate_object(obj_timer); this code will show the timer again.

Coming Soon: https://mc-game-zone.wixsite.com/mc-game-zone/coming-soon-01-1