Outils pour utilisateurs

Outils du site


en:yaml:timers

Ceci est une ancienne révision du document !


Language: Français | English

Timers (YAML)

JDR-Bot provides several timing mechanics.

Visual Pause {{timer:N}}

text: |
  The mechanism starts...
  {{timer:3}}
  The door opens!

Local Timer

A local timer is declared in an event and is cancelled when the player leaves the room.

events:
  - if: ~
    timer: hourglass
    duration: "30"
    to: expired_room
    text: "Timer started — v_hourglass_v seconds left."

Global Timer

global_timers:
  - id: bomb
    duration: 60
    state: OFF

events:
  - if: ~
    do: "global_timer:bomb:ON"

Autonomous global timers can run their own actions when they expire:

global_timers:
  - id: fatal_countdown
    duration: 60
    state: OFF
    text: "Time is up!"
    do:
      - "score.-.20"
    to: defeat_end

tick:

tick: runs every second on local or global timers.

events:
  - if: ~
    timer: tick_demo
    duration: "180"
    to: expired_room
    tick:
      - if: ~
        do: "ticks.+.1"
      - if: "v_ticks_v > 5"
        do: "other_var.+.1"
en/yaml/timers.1777825790.txt.gz · Dernière modification : de cyrilfiesta