Table des matières
Language / Langue : FR | EN
Graphical editor - Timers and HUD
Timers
Timers are set up in the inspector of a room (Events section, timer: action) or in the Globals panel (Global timers).
Fields of a global timer:
| Field | Role |
|---|---|
id | Unique identifier of the timer |
duration | Duration in seconds |
state | Initial state: ON or OFF |
do | Actions run when the timer reaches zero |
text | Message shown when the timer reaches zero |
tick | Actions run every second (optional) |
Actions on expiry and on tick use the regular do: syntax: score.+.1, a room identifier, trigger_event:id, and so on.
To start or stop a global timer from an event or a choice, use this action:
do: "timer_global:timer_name:ON" # ON, OFF or SWITCH
A local timer cancels itself when the player leaves the room. A global timer is paused with OFF, which keeps the remaining time.
HUD (persistent panels)
The HUD displays permanent information on the player screen: hit points, score, a mini-map, and so on. It is configured through hud: inside events.
Eight positions are available:
haut- top bandbas- bottom bandgauche- left edgedroite- right edgehaut-gauche,haut-droite- top cornersbas-gauche,bas-droite- bottom corners
Their English names work too: top, bottom, left, right, top-left, top-right, bottom-left, bottom-right.
Setting up a panel from the editor:
In the inspector, Events section, hud: action:
| Field | Role |
|---|---|
position | One of the eight positions above |
text | Contents, supporting v_name_v variables and [[split]] |
size, width, height | Optional dimensions |
background, text-color, font | Optional appearance |
resizable | Lets the player resize the panel |
The panel is refreshed every time the event defining it runs. Put an if: or visible-if: condition on that event when the panel must be conditional. For a live HUD, put the update inside a global event or inside a timer tick.
