• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

alarm

  1. S

    Running code after creation code

    I want to run some code after certain variables were set in the creation code. Whats the best way of doing this? I don't want to copy-paste any code in each creation code. Is there some sort of "After-creation-code"-event? Running an alarm set to 1 was another idea I had, but it seems very...
  2. D

    GameMaker Simple Voice Over and Responding to Audio

    Hi, I have animations for my sprite in which they appear to be talking and have come up with a system in which I have a "talk" variable for each of my sprites that needs to talk. I am currently using an alarm system in which the animation is told to begin and to stop, along with playing audio...
  3. A

    GameMaker [SOLVED] Burn Damage

    I've been searching google and the forums to no avail. I'm trying to make an on burn effect that only lasts 3-5 seconds. I have used alarms, if statements, case statements, for loops, but have only managed to get the effect to run once or constantly without stopping. I might be going slightly...
  4. D

    Legacy GM [SOLVED] Alarm Not Counting Down Properly

    I've set up an alarm variable that sets my variable, dashes, to 0 whenever it is equal to one (it also sets the variable isRecharging to false). You can see the effect of that here: if dashes < 1 { if dash { ++dashes; scr_player_dash(); scr_emit_dash_particles()...
  5. T

    Simple delay using DND?

    So I was following the tutorial series for making a shooter game with Drag and Drop. For the shooting functionality the tutorial has us create a variable for cooldown, set it's value to 0 and then only allow shooting when that variable is less than or equal to 0. I wanted to add a delay before...
  6. G

    Legacy GM [SOLVED] Help with Change Instance

    I need some help with my project. I have a sun and a moon. They will remain in the same place, and I want them to change every 30 seconds. But I do not know how to do that. Each of them has a sequence of 5 sprites. I am new to the programming codes, I tried to do it with DnD but I could not...
  7. L

    Legacy GM [Solved] Default Alarms and Delta timing?

    Hi! I have a question, do I need to change all my ALARMs to custom alarm systems to make them work with delta_time? Is there any way to make the default alarms work with delta_time?
  8. R

    GML [SOLVED] Problem with alarms

    Hello everyone In one of my objects, I have a piece of code where a for statement iterates through an array, and checks what is stored in all the array positions. According to what's in the given position of the array, an action will be performed. The thing is that I'd like to add a delay of 2...
  9. O

    Legacy GM alarm not work

    In the Step I wrote the following code: if(image_index = 17){ alarm[0] = 5 image_speed = 0 }else{ image_speed = 1 } This code in alarm [0]: image_xscale = 1.2 image_yscale = 1.2 alarm[1] = 20 The speed of the object does become zero but nothing happens in the alarm
  10. O

    Legacy GM How do I change direction by angle

    I do an object that according to this line of code, I want to move in different directions every few seconds: motion_set(choose(45, 135, 100, 225, 315), 5) In addition I want it to change the angle of the object according to the conveying direction. How can i do it?
  11. C

    GML Need help with collisions and alarms

    Hi - I've been having problems with how to collect resources with a collision event. What I want to happen is the player collides with the tree to cut some wood. The wood appears in their inventory every five seconds. The problem is that the alarm that I'm using never goes down due to it...
  12. Weastøne Entertainment

    Weird alarm values [SOLVED!]

    Hello there!, I am experiencing some weird values when using alarms. I'll show you a gif, look at the bottom where it says level, the first number (originally set to -1) is the alarm value, and the other turns 1 (true) if the alarm is running; this is my mechanism for cooldowns. The problem is...
  13. R

    Health(Bar)

    I am trying to implement a health bar into my game that changed depending on health out of 100. I want an enemy to do -25 damage when it collides with the main character but wait for a second or two before doing more damage (I used an alarm here). Obviously when Main character health = 0 restart...
  14. P

    GML [Help] Multiple Alarms not Working?

    I'm having trouble with setting up multiple alarms. Once I set up an alarm (Alarm 0) and another alarm ( Alarm 1), only the code in Alarm 0 runs, but the code in Alarm 1 does not run. In the step event: if (alarm[0] = -1) alarm = 100; timer = random_range(50,70); if (alarm[1] = -1) alarm = timer;
  15. M

    how to use alarm twice?

    Ok i am creating an enemy object and i want it to be such that whenever the player hits him, he flies above a little out of rage and starts throwing fire at the player for a while before coming down.. Tho it works, i want the enemy to also attack the player while he is on the ground like kick...
  16. yvodlyn

    Execution Error - Variable Index [2,20] out of range [20,20]

    I got this error: ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Alarm Event for alarm 0 for object obj_bad: Push :: Execution Error - Variable Index [2,20] out of range...
  17. J

    [SOLVED] function works different after click than after alarm

    I've set up a regular triggering effect, where I'm playing a string of piano notes, one note at a time, moving higher and higher in pitch. I start it with a mouse click on a button, then alarms are set, and the notes play indefinitely. The problem is, when I click the button, the first five...
  18. D

    Legacy GM Need Help Adding Time Between Rounds

    Hi, My original coding had it set up so when my enemies were all destroyed, the round would increase by 1 and more enemies would spawn than the previous round. This was my Step Event: if alarm[0] = -1 && Repeater > 0 {alarm [0] = room_speed} if (instance_number(obj_Enemy) = 0) { if...
  19. N

    setting vspeed/hspeed upon instance_create

    Hey all! So I have a few different spawning objects. I would like to set a certain vspeed/hspeed for the instances created by the each of spawning objects. For example an instance created with obj_spawner_a would have a vspeed of 1, but if that same object was instanced through obj_spawner_b...
  20. Y

    #Solved - Don't want alarm to reset.

    I have a game that I need to set an alarm after clicking, so in my click event I set an alarm and it would count to then I would be able to move again, but if i try to click while the alarm is running it just sets it again, I want it to set then not be able to be reset until I can move again.
Top