Latest revision |
Your text |
Line 1: |
Line 1: |
− | {{TOCRIGHT}}
| + | Call event is most useful event. |
− | Trigger event (verb '''''to trigger''''') is most useful event. It allows interaction between game objects.
| + | |
| | | |
− | Many entities can trigger other entities, or be triggered. For example you could open and close a door with a button, so here the button triggers the door. Not only buttons can trigger things, for example enemy could trigger a door when dies.
| + | It happens when trigger get touched, on monster dies, each object can have it's own behavior and launch call even under it's own circumstances. |
| | | |
− | In Blood Omnicide, trigger event can have custom instructions which is used to control the way entities react to the event.
| + | But structure of event is same all the time. |
| | | |
− | ===Event input=== | + | ===== Call event takes input ===== |
| | | |
− | * self - entity trigger event is being processed on
| + | * activator entity - who lets event go |
− | * activator - who lets event go (usually player) | + | * call entity - entity call is being processed on |
− | * parameters - instructions for trigger event, fetched from "targetparm" field of self. | + | * call parameters - instructions for call event, fetched from "targetparm" field of call entity. |
| | | |
− | ===Event rules===
| + | After input got fetches, |
| | | |
− | * Instructions are case insensative | + | * "nocall" parameter breaks call event |
− | * Instruction keywords are separated by space and TAB (except for braces)
| + | * If targetparm not begins with "select", "SELECT TARGETS;" is automatically added |
− | * ';' is the separator between instructions
| + | * Empty targetparm defaults to "select targets;call" |
− | * If trigger instructions not begin with "SELECT ", scripts automatically executes "SELECT TARGETS" at beginning. | + | |
− | * Empty instructions defaults to "SELECT TARGETS;CALL" | + | |
| | | |
− | ==Instructions== | + | == SELECT / ADD == |
| | | |
− | '''SELECT/ADD'''
| + | Starts and expands selection of entities, which will be called. |
− | :Starts (select) or expands (add) selection of [[Entity | entities]].
| + | |
− | :* 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 targetnames
| + | |
| | | |
− | '''INFOPORTION ''OPERATOR'''''
| + | * SELECT TARGETS - select entity to which i'm targeted |
− | :Manipulate [[Infoportions | infoportions]] on activator:
| + | * SELECT TARGETERS - select entities which are targeted to me |
− | :* '''INFO SET''' ''infoportion'' - add/update infoportion
| + | * SELECT BYID ''id1 id2 id3 ... idX'' - select entities by their save id's |
− | :* '''INFO DEL''' ''infoportion'' - delete infoportion
| + | * SELECT BYTARGETNAME ''targetname1 targetname2 ... targetnameX'' - select entities by their save id's |
− | :* '''INFO INC''' ''infoportion'' ''increase_by'' - increase infoportion value by 1 or by custom value (of presented)
| + | |
− | :* '''INFO DEC''' ''infoportion'' ''decrease_by'' - increase infoportion value by 1 or by custom value (of presented)
| + | |
| | | |
− | '''CALL'''
| + | == INFOPORTION == |
− | :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
| + | |
| | | |
− | '''''CUSTOM ACTION'''''
| + | Manipulate infoportions on activator. |
− | :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
| + | |
| | | |
− | '''BREAK or NOCALL''' | + | * INFOPORTION SET ''infoportion'' - adds/update infoportion |
− | :Immediately exit trigger event.
| + | * 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) |
| | | |
− | ==Event keys== | + | == ''[mask:]action'' == |
| | | |
− | Trigger event have general keys that is used for it.
| + | Call all selected entities with parameter. |
− | | + | |
− | Sometimes this keys are used by other kind of events too. This special behavior (if presented) is defined in particular class reference.
| + | |
− | | + | |
− | {{entity fields}}
| + | |
− | |-
| + | |
− | | Target
| + | |
− | | target
| + | |
− | | All entities with matching targetname will be triggered.
| + | |
− | |-
| + | |
− | | Target parameters
| + | |
− | | targetparm
| + | |
− | | When entity is triggered, this is instructions for trigger event (see instructions above);
| + | |
− | |-
| + | |
− | | Targetname
| + | |
− | | targetname
| + | |
− | | Entities with matching target will trigger this entity.
| + | |
− | {{entity fields end}}
| + | |
− | | + | |
− | == See also ==
| + | |
− | * [[Pattern script]]
| + | |
− | | + | |
− | {{finished}}
| + | |