en:txt:conditions
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| en:txt:conditions [2026/05/03 18:29] – Add English wiki page using real engine keys cyrilfiesta | en:txt:conditions [2026/08/31 20:47] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | **Language: | + | **Language |
| - | ====== | + | ====== Conditions |
| - | Legacy conditions are used in events and exits. YAML offers | + | Conditions restrict access to a room depending on the player' |
| - | Common checks: | + | ===== Object condition ===== |
| - | * object name: object owned | + | |
| - | * '' | + | < |
| - | | + | room_number|object1 object2|text_if_not|text_if_yes |
| + | </ | ||
| + | |||
| + | Several objects mean the player must hold **all** of them (logical AND). | ||
| + | |||
| + | To forbid entry when the player | ||
| + | |||
| + | < | ||
| + | 3|-lamp|You cannot enter carrying a lamp!|You enter without a lamp. | ||
| + | </ | ||
| + | |||
| + | ===== Variable condition ===== | ||
| + | |||
| + | < | ||
| + | room_number|v_score_v.> | ||
| + | </ | ||
| + | |||
| + | ^ Operator ^ Meaning ^ | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | For text variables: | ||
| + | |||
| + | < | ||
| + | 2|t_class_t.=." | ||
| + | </ | ||
| + | |||
| + | ===== Combining objects and variables ===== | ||
| + | |||
| + | Separate the conditions with a space: | ||
| + | |||
| + | < | ||
| + | 2|lamp v_hp_v.> | ||
| + | </ | ||
| + | |||
| + | ===== OR condition ===== | ||
| + | |||
| + | Repeat the room line with different conditions. The bot tests them in order and stops at the first one that succeeds: | ||
| + | |||
| + | < | ||
| + | 2|lamp|No lamp and no torch!|You enter with the lamp. | ||
| + | 2|torch|No lamp and no torch!|You enter with the torch. | ||
| + | </ | ||
en/txt/conditions.1777825799.txt.gz · Dernière modification : de cyrilfiesta
