Outils pour utilisateurs

Outils du site


en:txt:evenements

Ceci est une ancienne révision du document !


Language / Langue : FR | EN

997 events (.txt format)

Room 997 in the exit list triggers an event. It can be automatic, fired when the player enters the room, or manual, through a Discord reaction.

Basic syntax

997|condition|action|text
  • condition - trigger condition (null means always)
  • action - what happens (see the table below)
  • text - message shown (null means nothing)

Conditions

Syntax Meaning
null Always triggered
v_hp_v.=.0 If the hp variable equals 0
object If the player holds the object
-object If the player does not hold the object
v_a_v.=.v_b_v Compares two variables
v_a_v.=.1 v_b_v.=.2 Logical AND (a space between conditions)

Comparison operators are .=., .!=., .>., .>=., .<. and .⇐.. .in. tests a range, as in v_dice_v.in.1-3.

Actions

Syntax Effect
5 Go to room 5
v_room_v Go to the room whose number is held in the variable
score.+.10 Adds 10 to score
score.-.5 Subtracts 5
score.=.0 Sets the value
score.=.%1:6 Random value between 1 and 6
object&&inventory&&Description Adds an object to the inventory (inventaire also works)
-tired&&invisible&&You are not tired any more Removes an invisible state
name&&variable&&value&&desc Changes or declares a variable

Multiple actions

Separate actions with @@:

997|null|score.+.10@@3|You earn 10 points and move to room 3.

If one of the actions is a redirection (a room number), it runs last.

Sequential behaviour

Several 997 lines in the same room are evaluated in order. Each one sees the values already changed by the previous ones. A 997 that redirects stops the ones after it.

Full example

3 dice_roll
Roll the dice! Result: v_resultat_v
dice|variable|%=1:6|You roll v_resultat_v!|A six-sided die.
997|v_dice_v.in.1-3|1|Poor roll, you start over...
997|v_dice_v.in.4-6|4|Excellent! You move on.

Find us on the Make&Play Discord

en/txt/evenements.1788117446.txt.gz · Dernière modification : de cyrilfiesta