Editing Trigger event
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | Trigger event (verb ''to trigger'') is most useful event. It allows interaction between many game aspects. | |
− | Trigger event (verb | + | |
− | + | 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=== | + | === Event input === |
* self - entity trigger event is being processed on | * self - entity trigger event is being processed on | ||
Line 12: | Line 11: | ||
* parameters - instructions for trigger event, fetched from "targetparm" field of self. | * parameters - instructions for trigger event, fetched from "targetparm" field of self. | ||
− | ===Event rules=== | + | === Event rules === |
* Instructions are case insensative | * Instructions are case insensative | ||
− | |||
* ';' is the separator between instructions | * ';' is the separator between instructions | ||
− | * If trigger instructions not begin with "SELECT ", | + | * 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" | ||
− | + | = Instructions = | |
− | + | {| width=85% cellspacing=0 cellpadding=4 border=1 style="border-collapse: collapse" | |
− | + | ! width=2% | Order | |
− | + | ! width=10% | Syntax | |
− | + | ! width=88% | Description | |
− | + | |- | |
− | + | | align=center | 1 | |
+ | | SELECT/ADD | ||
+ | | Starts (select) and expands (add) selection of [[Entity | entities]], which will be called. | ||
− | ' | + | * SELECT TARGETS - select entity to which i'm targeted |
− | + | * SELECT TARGETERS - select entities which are targeted to me | |
− | + | * SELECT BYID ''<id1> <id2> <id3> ... <idX>'' - select entities by their save id's | |
− | + | * SELECT BYTARGETNAME ''<targetname1> <targetname2> ... <targetnameX>'' - select entities by their save id's | |
− | + | |- | |
− | + | | align=center | 2 | |
+ | | INFOPORTION <OPERATOR> | ||
+ | | Manipulate [[Infoportion | infoportions]] on activator. | ||
− | ''' | + | * INFOPORTION SET ''infoportion'' - add/update infoportion |
− | + | * INFOPORTION DEL ''infoportion'' - delete infoportion | |
− | + | * INFOPORTION INC ''infoportion'' ''[increase_by]'' - increase infoportion value by 1 or by custom value (of presented) | |
− | + | * INFOPORTION DEC ''infoportion'' ''[decrease_by]'' - increase infoportion value by 1 or by custom value (of presented) | |
− | + | |- | |
− | + | | align=center | 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 | |
+ | |- | ||
+ | | align=center | 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 | ||
+ | |- | ||
+ | | align=center | 5 | ||
+ | | BREAK or NOCALL | ||
+ | | Immediately exit trigger event. | ||
+ | |} | ||
+ | |||
+ | = Event keys = | ||
+ | |||
+ | Trigger event have general keys that is used for it, sometimes this keys are used by other kind of events too. This special behavior is defined in particular class reference. | ||
+ | |||
+ | {| cellspacing=0 cellpadding=5 border=1 style="border-collapse: collapse" | ||
+ | ! width=10% | Name | ||
+ | ! width=10% | Key | ||
+ | ! width=70% | Description | ||
+ | ! width=10% | Default value | ||
+ | |- | ||
+ | | colspan=3 | '''Common item keys''' | ||
|- | |- | ||
| Target | | Target | ||
| target | | target | ||
− | | | + | | This entity till be triggered when item is picked. |
|- | |- | ||
| Target parameters | | Target parameters | ||
| targetparm | | targetparm | ||
− | | | + | | Instructions for trigger event; Type "nocall" here to disable trigger event. |
|- | |- | ||
| Targetname | | Targetname | ||
| targetname | | targetname | ||
− | | | + | | If set, item becomes hidden and got spawned when triggered. If target is set, item will perform spawn move from the center of it's targeter. |
− | + | |} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |