Outils pour utilisateurs

Outils du site


en:editeur:timers-hud

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
en:editeur:timers-hud [2026/07/06 00:12] – maj 4.13 : modes d'interface + corrections cyrilfiestaen:editeur:timers-hud [2026/08/31 20:44] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta
Ligne 1: Ligne 1:
 **Language / Langue :** [[fr:editeur:timers-hud|FR]] | **EN** **Language / Langue :** [[fr:editeur:timers-hud|FR]] | **EN**
  
-====== Editor - Timers and HUD ======+====== Graphical editor - Timers and HUD ======
  
-The editor can create local timersglobal timerstick actions and persistent HUD panels.+===== 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: 
 + 
 +<code yaml> 
 +do: "timer_global:timer_name:ON"       # ON, OFF or SWITCH 
 +</code> 
 + 
 +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 band 
 +  * ''bas'' - bottom band 
 +  * ''gauche'' - left edge 
 +  * ''droite'' - right edge 
 +  * ''haut-gauche'', ''haut-droite'' - top corners 
 +  * ''bas-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.
  
-HUD panels can be attached to rooms, choices, events and actions. They support position, size, width, height, background, text color, font and conditional text. 
en/editeur/timers-hud.1783289553.txt.gz · Dernière modification : de cyrilfiesta