Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

alarm_create_seconds()

Xubiod edited this page Oct 21, 2017 · 12 revisions

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;