Alarm event: Difference between revisions

From ENIGMA
Jump to navigation Jump to search
m (Adding more detail)
m (Changed D&D link to point to Action)
 
(4 intermediate revisions by 2 users not shown)
Line 12: Line 12:
# Add the actions and/or code you wish to execute inside the Actions column for that alarm
# Add the actions and/or code you wish to execute inside the Actions column for that alarm
==Creating an alarm action==
==Creating an alarm action==
===Using D&D===
Below is a table comparing the different ways of creating an alarm action. Which method you use depends on which development approach (or type) you are using.
 
{| border="1" class="wikitable"
! Type
! Method
|-
! [[Action|D&D]]
|
# From the menu Main2 inside the Actions column, drag and drop the clock action to the place you want the event to be triggered
# From the menu Main2 inside the Actions column, drag and drop the clock action to the place you want the event to be triggered
# A menu will now appear - fill it out and press save
# A menu will now appear - fill it out and press save. ''For help in filling out the form, see [[Action set alarm]]''
::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)===
|-
! GML
|
''Unfinished''
''Unfinished''
===Using code (C)===
 
|-
! C
|
''Unfinished''
''Unfinished''
|}
=Modifying an alarm=
=Modifying an alarm=
==Increasing the time on 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:
If you wish to delay an alarm event from being triggered, you can add an alarm action as follows:
===Using D&D===
 
{| border="1" class="wikitable"
! Type
! Method
|-
! D&D
|
# Add an alarm action
# Add an alarm action
# In 'number of steps', add the amount of time you want to add to the alarm's countdown
# In 'number of steps', add the amount of time you want to add to the alarm's countdown
# Check the box '[[Relative|Relative and absolute]]'.
# Check the box '[[Relative and absolute|Relative]]'.
===Using code (GML)===
 
|-
! GML
|
''Unfinished''
''Unfinished''
===Using code (C)===
 
|-
! C
|
''Unfinished''
''Unfinished''
|}
==Temporarily turning an alarm off==
==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:
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===
{| border="1" class="wikitable"
! Type
! Method
|-
! D&D
|
''Unfinished''
''Unfinished''
===Using code (GML)===
 
|-
! GML
|
''Unfinished''
''Unfinished''
===Using code (C)===
 
|-
! C
|
''Unfinished''
''Unfinished''
|}

Latest revision as of 06:00, 20 August 2013

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 (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

Below is a table comparing the different ways of creating an alarm action. Which method you use depends on which development approach (or type) you are using.

Type Method
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 help in filling out the form, see Action set alarm


GML

Unfinished

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:

Type Method
D&D
  1. Add an alarm action
  2. In 'number of steps', add the amount of time you want to add to the alarm's countdown
  3. Check the box 'Relative'.
GML

Unfinished

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:

Type Method
D&D

Unfinished

GML

Unfinished

C

Unfinished