alarm_create_seconds() - xubiod/gml-scripts GitHub Wiki
Creates an alarm by seconds, based on current room speed.
Syntax
alarm_create_seconds(alarm id, time)
Argument | Description |
---|---|
alarm id | The alarm to set. |
time | The amount of seconds to set the alarm to. (Based on room speed) |
Returns: Nothing
Description
This function creates an alarm with the ID provided, and sets the time to the amount of seconds provided.
The seconds are calculated with the current room_speed
, so changing room_speed
while the alarm is running will change how long the alarm goes for.
Example:
alarm_create_seconds(0, 5);
This creates an alarm with the ID of 0 that will last for 5 seconds.
GML Equivalent:
These are how you can set up what this function does without using the function.
var sec = 5; alarm_set(0, sec * room_speed);
or var sec = 5; alarm[0] = sec * room_speed;