• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

alarms

  1. T

    GML Performance difference between using step-based timers and alarms

    Hi there! I have the habit of using step-based timers, such as: CREATE EVENT: timer = 0; STEP EVENT: timer ++; if (timer >= room_speed) { //do stuff timer = 0; } But GMS/GML has the built-in Alarm System, which does pretty much the same. Anyone knows if using alarms is...
  2. G

    GML How could I use the "alarm" event? [SOLVED]

    I'm making a "rolling shooters" for practice and I want to know how I could use the "alarms". I read the GameMaker's guide and I did not understand anything. What I want to do is when the player shoots he has to wait 2 or 3 seconds to be able to shoot again. What have I to put in there? My...
  3. Nathan Laing

    Legacy GM [SOLVED] Using alarms as alternative create events

    Greetings, In specific circumstances, I've been using alarms as alternative create events. The circumstances being that I require object A to create object B and object B must do some calculations in the create event with variables specified by object A. However, the create event for object B...
  4. telli01

    Alarms not working?

    Hello everyone, I want to create a new instance of an enemy_obj at a random position with a delay of 2 seconds when it gets destroyed. This is my code and the alarm does not work so far: DESTROY EVENT alarm[0] = 2*room_speed; show_debug_message("enemy instance destroyed!"); ALARM 0 EVENT...
  5. J

    Alarms and health (GMS 1.4)

    In my game there is water which is deadly to the player, the player has 3 hearts. What I'm trying to achieve but cannot figure out is how to minus a heart after 1 second of the player being in the same x/y position of the water. I will post my code to show what I tried to do. If more code is...
  6. L

    GMS 2 Alarm help

    I am new to Game Maker and I am currently giving the Lite version a try before purchasing a full version. I apologize in advance if my naming is not conventional because I do not yet know the norms of naming sprites and objects and such. I also don't know how to make code look like code on my...
  7. S

    Alarm Cancelling

    Hey everyone, so the game I’m trying to make is pretty simple. The player is a ghost and has to possess all of the humans in the room before it can move on. I want it to where the player has to hold down F for 3 seconds while making contact with the human before the human is possessed. Right now...
  8. O

    Windows Alarms just not working

    (In Destroy (for an object)) alarm[0] = 120 (In Alarm 0) room_goto_previous() The room change works if i just put "room_goto_previous" in the destroy without the alarm so i know that it is being activated. I have tried all sorts of things but nothing seems to make the alarm work. I have also...
  9. N

    Legacy GM [Solved]Alarm Repeating itself without adding a life

    Good evening, Please I need help with this. I have gotten alarms to work in the past but I can't seem to get this one to work. I am trying to create a count down timer that counts to zero and awards the player a life at the end then it counts down again and rewards the player another life at...
  10. I

    GMS 2 Limiting Firing Rate

    Hey, guys, I am trying to find a way to limit the firing rate for a gun in my game (you are the gun so shooting is how you move) I noticed there isn't any wait function, and I have tried alarms but even with this code mouse_check_button_pressed(mb_left) It just constantly fires anyone have any...
  11. X

    Legacy GM [SOLVED] Alarm toggling

    I'm making a security camera that pans back and forth on a series of alarms and rotates a triangle for use as a "vision-cone". I'm also letting the player take control of the camera by pressing 'C' and then manually rotating it with the arrow keys. 'C' toggles the state of the "camCon" variable...
  12. K

    Alarm getting caught in logic loop

    Hi Y'all! It's my first time posting so please be gentle on me if I explain this poorly. I am looking for better ways to trigger alarms as I am currently placing them in the step event and they keep getting reset and never actually activating. Below is a sample of my code that I am getting...
  13. B

    How do you do a double press to dash

    I'm coding a platformer where you press the D key to move right and A for left. I want to make it where if you go left or right you will walk normally, and if you double press left or right you begin to run. I've tried to do it my self and the code won't work. I've also gone to the internet but...
  14. M

    Need Help With Ant Colony Game

    I have recently begun working on an Ant Colony RTS game on GameMaker 8 which I have a ton of ideas for (though am open to new suggestions). I have a bunch of minor things done but still need a bit more help with it. One of the biggest things that is troubling me right now is that I am unable to...
  15. B

    GML How to create a timer using delta time?

    I'm working on a game and I decided to use delta time and set the game speed to 240 (Yes it's overkill) but I've noticed when using the standard alarms and setting it to be the game speed (So it should execute after one second) it takes much longer using the UWP export. It works perfectly on...
  16. M

    GML Problem With Alarms

    I'm creating a game called bomb run and in the bomb spawner object I have 3 alarms. One alarm creates the bomb somewhere random in the map, another alarm decreases the spawn rate of the bombs but does not let it hit 0, and the third one makes the bomb animation play faster so the bombs will...
  17. FrostyCat

    GML What's the Difference: Loop Structures vs. Step Checks and Alarms

    What's the Difference: Loop Structures vs. Step Checks and Alarms GM Version: GMS 2.x, GMS 1.x Target Platform: All Download: N/A Links: N/A Summary: An explanation of when to use loops and when not to, plus a brief overview of non-blocking repetition Summary Many recent novices needlessly...
  18. A

    GML Wave System and timelines...

    So, I am planning on making a wave system that will go on for thousands of waves, and I am using timelines. Wouldn't it take quite long to make that many waves? I have an idea on how to do it, but I don't really know how to code it. I've already tried three different times and it still won't...
  19. P

    GMS 2 Limiting spawn rate of enemies?

    I'm creating a platform shooter in the trial version of GameMaker Studio 2 based off of HeartBeast's Platform Shooter series. I would like to create my own custom enemy spawning system, but I've run into a problem. Basically, I have a spawner object in my room that I've set two alarm events for...
  20. G

    How to use alarms to make a platform that appears and disappears

    I know that i can make this by using the alarms but i dont know how, i want to make a platform that is visible and solid for about 1.5/2 sec then it disappears and then appears again, can someone help me ?
Top