Alarm_event - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

An alarm is a variable used to trigger an event after a set period of time has elapsed. Alarms are very much like timers. Once you create an alarm, it will begin counting down. When it reaches zero, the corresponding alarm event will be triggered.

How to create an alarm

To have a working alarm, you will need two things:

  1. An alarm event (containing the actions to be performed when the alarm is triggered)
  2. An alarm action (creating the alarm, and starting its countdown)

Creating an alarm event

  1. Open LateralGM
  2. Create or open an object
  3. Click the event selector icon (File:event_selector.png) at the top right hand of the screen
  4. Click and drag one of the alarms into the Events column for that object. As you can see, you are provided with up to eleven different alarms per object.
  5. Add the actions and/or code you wish to execute inside the Actions column for that alarm

Creating an alarm action

Using D&D

  1. From the menu Main2 inside the Actions column, drag and drop the clock action to the place you want the event to be triggered
  2. A menu will now appear - fill it out and press save
  -
    For 'number of steps', enter the number of frames during which
    the alarm should countdown. For example, if your game runs at 30
    frames per second, setting this value to 300 will mean the alarm
    event will be triggered after 10 seconds (300/30).
    For 'alarm', enter a number between one and eleven. You are
    telling LateralGM which alarm has been created. For example, if
    you set this variable to be 0, then when the alarm countdown
    reaches zero, event Alarm 0 will be triggered.

Using code (GML)

Unfinished

Using code (C)

Unfinished

Modifying an alarm

Increasing the time on an alarm

If you wish to delay an alarm event from being triggered, you can add an alarm action as follows:

Using D&D

Using code (GML)

Unfinished

Using code (C)

Unfinished

Temporarily turning an alarm off

There are times when you would like to pause an alarm's countdown, without deleting the alarm. This is achieved as follows:

Using D&D

Unfinished

Using code (GML)

Unfinished

Using code (C)

Unfinished