en:txt:actions
Ceci est une ancienne révision du document !
Table des matières
Language / Langue : FR | EN
Custom actions (.txt format)
Custom actions add freely named commands to your scenario. The player then types actionname target.
Declaration
An action goes either in the exit list of a room (local action) or after the last * (global action):
action:target|condition(s)|effect|OK text|KO text
action- the command verb (for exampleopen,combine,inspect)target- the specific target (door,chest) orallto accept anythingcondition- required objects or variables (ornull)effect- variable change, object added, using the same syntax as a 997 eventOK text/KO text- messages shown when the condition is met or not
The player then types open door, combine herb, and so on.
The all target
With all, the command accepts any target. The variable action_cible holds what the player typed, and action_cible_ok holds the last valid target. These names stay in French: they are reserved variables of the engine.
inspect:all|null|null|You look closely at «action_cible».|Nothing of interest here.
Priority and multiple conditions
- The same
action:targetcan be declared several times with different conditions. The first one whose conditions are met is executed. - Local actions are tested before global ones.
- If no condition is met, the KO text of the last line is shown.
Full example
open:chest|key|null|You open the chest with the key!|You need a key. open:chest|null|null|The chest is locked.|null break:all|null|null|You strike «action_cible» with all your strength!|null
Find us on the Make&Play Discord
en/txt/actions.1788117409.txt.gz · Dernière modification : de cyrilfiesta
