Trigger event

From Blood Wiki
(Difference between revisions)
Jump to: navigation, search
Line 15: Line 15:
 
* 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 ", "SELECT TARGETS;" is automatically added
+
* 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"
  

Revision as of 08:19, 12 July 2012

Trigger event (verb to trigger) is most useful event. It allows interaction between many game objects.

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.
  • 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
2 INFOPORTION <OPERATOR> Manipulate 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)
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.


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.

Name Key Description Default value
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.


Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox