In the game that I am currently creating, one of the characters eat a fruit and then become invincible. I have reached the invincibility part, but I don't know how to make it so that it loses invincibility after around twenty seconds.
Please help?
How to set a time limit?
Started by CANTODENGHKY, Aug 30 2012 10:25 AM
4 replies to this topic
#1
Posted 30 August 2012 - 10:25 AM
#2
Posted 30 August 2012 - 10:51 AM
when the player becomes invincible, set an alarm to 600 (if your game works at 30 fps), and in that alarm event stop the invincibility.
#3
Posted 30 August 2012 - 11:39 AM
Yea, I'm sorry, but I'm really new to Game Maker, started using it in only the last week, so could you please give step by step instruction?
Thank You.
Thank You.
#4
Posted 30 August 2012 - 11:59 AM
In the main2 tab..I think, there's a DnD icon with a clock on it. This is an alarm, set it to 600, this is about 20 seconds if your room speed is 30. In the event alarm0 set invincible to false. Hope I helped.
#5
Posted 02 September 2012 - 05:36 AM
I find the above information incomplete, since they just say the number, but what about when you want to change it?
The alarm is based on the room_speed for example, If you want it to be 20 seconds then you could add the alarm time this way:
The alarm is based on the room_speed for example, If you want it to be 20 seconds then you could add the alarm time this way:
alarm[0]=room_speed*20;//By just replacing the 20 you can select any number like for example change it with 5 for 5 seconds and such.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











