Editing Trigger event

Jump to: navigation, search

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:
{{TOCRIGHT}}
 
 
Trigger event (verb '''''to trigger''''') is most useful event. It allows interaction between game objects.
 
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.
+
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. You could also move a floor when player touches some area. Not only buttons can trigger things, for example enemy could open a door when dies.
  
In Blood Omnicide, trigger event can have custom instructions which is used to control the way entities react to the event.  
+
For Blood Omnicide, trigger event was extended to allow custom instructions.  
  
===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
* Instruction keywords are separated by space and TAB (except for braces)
 
 
* ';' is the separator between instructions
 
* ';' is the separator between instructions
 
* If trigger instructions not begin with "SELECT ", scripts automatically executes "SELECT TARGETS" at beginning.
 
* If trigger instructions not begin with "SELECT ", scripts automatically executes "SELECT TARGETS" at beginning.
 
* Empty instructions defaults to "SELECT TARGETS;CALL"
 
* Empty instructions defaults to "SELECT TARGETS;CALL"
  
==Instructions==
 
  
'''SELECT/ADD'''
+
= Instructions =
: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'''''
+
{| width=85% cellspacing=0 cellpadding=4 border=1 style="border-collapse: collapse"
:Manipulate [[Infoportions | infoportions]] on activator:
+
! width=2% | Order
:* '''INFO SET''' ''infoportion'' - add/update infoportion
+
! width=10% | Syntax
:* '''INFO DEL''' ''infoportion'' - delete infoportion
+
! width=88% | Description
:* '''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)
+
| align=center | 1
 +
| SELECT/ADD
 +
| Starts (select) or expands (add) selection of [[Entity | entities]].
  
'''CALL'''
+
* SELECT TARGETS - select entity to which i'm targeted
:This triggers all selected entities with their default action.
+
* SELECT TARGETERS - select entities which are targeted to me
:Can prefix this instruction with <classname:>. In this case trigger event will only be processed on entities with matching class name.
+
* SELECT BYID ''<id1> <id2> <id3> ... <idX>'' - select entities by their save id's
:Examples:
+
* SELECT BYTARGETNAME ''<targetname1> <targetname2> ... <targetnameX>'' - select entities by their targetnames
::select targets;effect_light:call
+
|-
::select byid 145;call
+
| align=center | 2
 +
| INFOPORTION <OPERATOR>
 +
| Manipulate [[Infoportion | infoportions]] on activator.
  
'''''CUSTOM ACTION'''''
+
* INFOPORTION SET ''infoportion'' - add/update infoportion
:One of object's supported custom trigger actions. Classname filter is supported.
+
* INFOPORTION DEL ''infoportion'' - delete infoportion
:Examples:
+
* INFOPORTION INC ''infoportion'' ''[increase_by]'' - increase infoportion value by 1 or by custom value (of presented)
::select targets;effect_light:on
+
* INFOPORTION DEC ''infoportion'' ''[decrease_by]'' - increase infoportion value by 1 or by custom value (of presented)
::select byid 145;trigger_puzzle:toggle 2 1 3
+
|-
 +
| align=center | 3
 +
| CALL
 +
| This triggers all selected entities with their default action.
  
'''BREAK or NOCALL'''
+
Can prefix this instruction with <classname:>. In this case trigger event will only be processed on entities with matching class name.
:Immediately exit trigger event.
+
  
==Event keys==
+
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.
 +
|-
 +
| align=center | 6
 +
| ?
 +
| Each entity class can have special call parameters. Like doors have directives to open and close, enemies can change their path or spawn in special origin.
 +
|}
 +
 
 +
 
 +
= Event keys =
  
 
Trigger event have general keys that is used for it.
 
Trigger event have general keys that is used for it.
  
Sometimes this keys are used by other kind of events too. This special behavior (if presented) is defined in particular class reference.
+
Sometimes this keys are used by other kind of events too. This special behavior is defined in particular class reference.
  
 
{{entity fields}}
 
{{entity fields}}
Line 73: Line 97:
 
{{entity fields end}}
 
{{entity fields end}}
  
== See also ==
+
__NOTOC__
* [[Pattern script]]
+
 
+
{{finished}}
+

Please note that all contributions to Blood Wiki are considered to be released under the Creative Commons Attribution Share Alike (see BloodWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)

This page is a member of 1 hidden category:

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox