Trigger event
From Blood Wiki
(Difference between revisions)
m (VorteX moved page Call event to Trigger event: misspelled) |
|||
Line 1: | Line 1: | ||
− | + | Trigger event (verb ''to trigger'') is most useful event. It allows interaction between many game aspects. | |
− | It happens when trigger get touched, on monster dies, each object can have it's own behavior and launch | + | It happens when trigger get touched, on monster dies, each object can have it's own behavior and launch trigger event under it's own circumstances. |
But structure of event is same all the time. | But structure of event is same all the time. | ||
Line 7: | Line 7: | ||
=== Event input === | === Event input === | ||
− | * self - entity | + | * self - entity trigger event is being processed on |
− | * activator - who lets event go (usually player | + | * activator - who lets event go (usually player) |
− | * parameters - instructions for | + | * parameters - instructions for trigger event, fetched from "targetparm" field of self. |
=== Event rules === | === Event rules === | ||
Line 15: | Line 15: | ||
* Instructions are case insensative | * Instructions are case insensative | ||
* ';' is the separator between instructions | * ';' is the separator between instructions | ||
− | * If | + | * If trigger instructions not begin with "SELECT ", "SELECT TARGETS;" is automatically added |
* Empty instructions defaults to "SELECT TARGETS;CALL" | * Empty instructions defaults to "SELECT TARGETS;CALL" | ||
Line 45: | Line 45: | ||
| align=center | 3 | | align=center | 3 | ||
| CALL | | CALL | ||
− | | This | + | | This triggers all selected entities with their default action. |
− | Can prefix this instruction with <classname:>. In this case | + | Can prefix this instruction with <classname:>. In this case trigger event will only be processed on entities with matching class name. |
Examples: | Examples: | ||
Line 57: | Line 57: | ||
| align=center | 4 | | align=center | 4 | ||
| <CUSTOM ACTION> | | <CUSTOM ACTION> | ||
− | | One of object's supported custom | + | | One of object's supported custom trigger actions. Classname filter is supported. |
Examples: | Examples: | ||
Line 67: | Line 67: | ||
| align=center | 5 | | align=center | 5 | ||
| BREAK or NOCALL | | BREAK or NOCALL | ||
− | | Immediately exit | + | | Immediately exit trigger event. |
|} | |} |
Revision as of 21:40, 10 July 2012
Trigger event (verb to trigger) is most useful event. It allows interaction between many game aspects.
It happens when trigger get touched, on monster dies, each object can have it's own behavior and launch trigger event under it's own circumstances.
But structure of event is same all the time.
Event input
- self - entity trigger event is being processed on
- activator - who lets event go (usually player)
- parameters - instructions for trigger event, fetched from "targetparm" field of self.
Event rules
- Instructions are case insensative
- ';' is the separator between instructions
- If trigger instructions not begin with "SELECT ", "SELECT TARGETS;" is automatically added
- Empty instructions defaults to "SELECT TARGETS;CALL"
Instructions
Order | Syntax | Description |
---|---|---|
1 | SELECT/ADD | Starts (select) and expands (add) selection of entities, which will be called.
|
2 | INFOPORTION <OPERATOR> | Manipulate infoportions on activator.
|
3 | CALL | This triggers all selected entities with their default action.
Can prefix this instruction with <classname:>. In this case trigger event will only be processed on entities with matching class name. Examples: select targets;effect_light:call select byid 145;call |
4 | <CUSTOM ACTION> | One of object's supported custom trigger actions. Classname filter is supported.
Examples: select targets;effect_light:on select byid 145;trigger_puzzle:toggle 2 1 3 |
5 | BREAK or NOCALL | Immediately exit trigger event. |