Outils pour utilisateurs

Outils du site


en:yaml:timers

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:yaml:timers [2026/08/30 21:23] – maj 4.14 : dialogues, videos hebergees, mise en page, doc EN completee cyrilfiestaen:yaml:timers [2026/10/19 01:29] (Version actuelle) – Wiki 4.17 : corrections apres audit des exemples et traductions cyrilfiesta
Ligne 5: Ligne 5:
 JDR-Bot provides several timing mechanics. JDR-Bot provides several timing mechanics.
  
-===== Visual Pause {{timer:N}} =====+===== Visual Pause %%{{timer:N}}%% =====
  
 <code yaml> <code yaml>
Ligne 69: Ligne 69:
         do: "other_var.+.1"         do: "other_var.+.1"
 </code> </code>
 +
 +On a global timer:
 +
 +<code yaml>
 +global_timers:
 +  - id: poison_tick
 +    duration: 30
 +    state: OFF
 +    tick:
 +      - if: "v_hp_v > 0"
 +        do: "hp.-.1"
 +        text: "The poison acts... (HP: v_hp_v)"
 +</code>
 +
 +  * ''tick:'' runs independently of ''to:'' and ''do:'', which run when the timer expires.
 +  * Leaving the room cancels a local timer and its tick.
 +  * Calls through ''trigger_event:'' are limited to 10 nested levels, including from a tick.
  
 ===== Stopping a timer ===== ===== Stopping a timer =====
Ligne 77: Ligne 94:
  
 <code yaml> <code yaml>
-faire: "timer_global:bombcount:OFF"      # pauses the timer +do: "timer_global:bomb:OFF"      # pauses the timer
-faire: "timer_global:bombcount:SWITCH"   # toggles its state+
 </code> </code>
  
-''OFF'' keeps the remaining time: a later ''ON'' resumes where the timer stopped.+Or:
  
-**Find us on the [[https://discord.gg/Z63DtVV|Make&Play Discord]]**+<code yaml> 
 +do: "timer_global:bomb:SWITCH"   # toggles its state 
 +</code> 
 + 
 +''OFF'' keeps the remaining time: a later ''ON'' resumes where the timer stopped.
  
en/yaml/timers.1788117789.txt.gz · Dernière modification : de cyrilfiesta