Jump to content

XML:BINA/OBJC/TRIG: Difference between revisions

m
copy-edit
m (link fix)
m (copy-edit)
Line 1: Line 1:
{{XML_OBJC_Header | prev=TRGV | type=TRIG | next=TURR | name=Trigger}}
{{XML_OBJC_Header | prev=TRGV | type=TRIG | next=TURR | name=Trigger}}


===general information===
==General information==
* The xml code on this page was tested with onisplit v0.9.94.0
* The XML on this page was tested with OniSplit v0.9.94.0.
* '''BINACJBOTrigger.oni''' is level specific. (It can be found in AE/AEInstaller/vanilla/level'''X'''_Final.dat)
* BINACJBOTrigger is level-specific (level''x''_Final.dat).


===BSL support===
==BSL support==
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
!command
!Command
!description
!Description
!example
!Example
|-
|-
|marketing_line_off
|marketing_line_off
Line 40: Line 40:
|}
|}


 
==File structure==
===file structure===
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 49: Line 48:
  </Oni>
  </Oni>


'''''[...]''''' means at least one trigger. Paste all trigger data into there (this includes '''<font color="#0A0"><TRIG Id="..."></font>''' and '''<font color="#0A0"></TRIG></font>''' tag).
'''''[...]''''' means at least one trigger. Paste all your trigger data in there (this includes the '''<font color="#0A0"><TRIG Id="..."></font>'''/'''<font color="#0A0"></TRIG></font>''' tag).


'''example'''
'''Example'''
[[Image:XML_TRIG_trigger_modded.jpg|400px|right|thumb]]
[[Image:XML_TRIG_trigger_modded.jpg|400px|right|thumb]]


Line 86: Line 85:
         '''<font color="#0A0"></TRIG></font>'''
         '''<font color="#0A0"></TRIG></font>'''


===tags===
==Tags==
 
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
!width=280px| tag
!width=280px| Tag
!width=60px| type
!width=60px| Type
! description
! Description
|-
| <?xml version="1.0" encoding="utf-8"?>
| float, flag
| Don't change this.
|-
| <Oni>
| -
|
|-
|-
| <TRIG Id="...">
| <TRIG Id="...">
| integer
| integer
| You can also use <TRIG> without the id parameter.
| You can also use <TRIG> without the ID parameter.
|-
|-
| <Header>
| <Header>
Line 115: Line 105:
| <Position>
| <Position>
| float x3
| float x3
| trigger is spawned at this xyz-position
| Trigger is spawned at this XYZ position.
|-
|-
| <Rotation>
| <Rotation>
| float x3
| float x3
| trigger has this xyz-rotation (in degrees)
| Trigger has this XYZ rotation (in degrees).
|-
|-
| <OSD>
| <OSD>
Line 129: Line 119:
| <font color="#777777">TRIG</font>file<font color="#777777">.oni</font>
| <font color="#777777">TRIG</font>file<font color="#777777">.oni</font>


This is a link to [[XML:TRIG|TRIG]] (trigger class), which holds the [[XML:M3GM|M3GM]] of the rail and links to [[XML:TRGE|TREG]] (laser emitter class) and [[XML:OBAN|OBAN]] (animation of the emitters)).
This is a link to [[XML:TRIG|TRIG]] (trigger class), which holds the [[XML:M3GM|M3GM]] (3D model) of the rail and links to [[XML:TRGE|TRGE]] (laser emitter class) and [[XML:OBAN|OBAN]] (animation of the 3D model).


original classes:
Original classes:
: trigger_arc
: trigger_arc
: trigger_circle
: trigger_circle
Line 145: Line 135:
| <TriggerId>
| <TriggerId>
| int16
| int16
| Used by BSL commands. Is it possible to use the same id for different triggers?
| Used by BSL commands. Is it possible to use the same ID for different triggers?
|-
|-
|valign="top"| <Flags>
|valign="top"| <Flags>
Line 156: Line 146:
|valign="top"| <LaserColor>
|valign="top"| <LaserColor>
|valign="top"| color
|valign="top"| color
| [[wikipedia:RGB_color_model#Numeric_representations|R G B]] range, e.g. <LaserColor>255 0 77</LaserColor>
| [[wikipedia:RGB_color_model#Numeric_representations|RGB]] value, e.g. <LaserColor>255 0 77</LaserColor>
|-
|-
| <StartPosition>
| <StartPosition>
| float
| float
| start position of the trigger in the rail; range from 0 (bottom) to 1 (top) in connection to the spawn point of the trigger (spawn point = bottom)  
| Start position of the trigger in the rail; ranges from 0.0 (bottom) to 1.0 (top) in relation to the spawn point of the trigger (spawn point = bottom).
|-
|-
|valign="top"| <Speed>
|valign="top"| <Speed>
|valign="top"| float
|valign="top"| float
| This is one for two multiplier. The second multiplier can be accessed via BSL command ''trig_speed id speed''.
| This is one of two multipliers. The second multiplier can be set via the BSL command ''trig_speed id speed''.


total_speed = OBAN_speed * multiplier_in_file * multiplier_BSL
total_speed = OBAN_speed * multiplier in file * multiplier in BSL


So if one of the multiplier is set to 0, the trigger will stop moving.
So if one of the multipliers is set to 0, the trigger will stop moving.
|-
|-
| <EmitterCount>
| <EmitterCount>
| int16
| int16
| Number of emitter to spawn on the rail?
| Number of emitters to spawn on the rail?
|-
|-
| <TimeOn>
| <TimeOn>
| int16
| int16
| laser is emitting its beam for X frames
| Number of frames that laser should be on in a power cycle.
|-
|-
| <TimeOff>
| <TimeOff>
| int16
| int16
| laser is not emitting its beam for X frames
| Number of frames that laser should be off in a power cycle.
|-
|-
| <Events>
| <Events>
| -
| -
| in16 array. You can use multiple events.
| int16 array. You can use multiple events.
|-
|-
|valign="top"| <Script Function="call_this_BSL_function" />
|valign="top"| <Script Function="call_this_BSL_function" />
|valign="top"| char[32]
|valign="top"| char[32]
| Name of BSL function. For example if you use "call_this_BSL_function" here then write in BSL file:
| Name of linked BSL function. For example if you use "call_this_BSL_function" here, then write in the BSL script:
  ''func call_this_BSL_function
  ''func call_this_BSL_function
  {
  {
Line 235: Line 225:
|}
|}


 
==Laser rotations==
===laser movements===
The hardest part in setting up triggers is pointing them in the correct direction. Here are the Rotation numbers for each direction.
The hardest part in setting up triggers was pointing them in the correct direction. After much testing here are the Rotation numbers for each direction. - EdT


http://edt.oni2.net/Lair_Tutorial/Triggerface0.jpg
http://edt.oni2.net/Lair_Tutorial/Triggerface0.jpg


Laser Direction 0:
*<tt><Rotation>0 90 0</Rotation></tt>: Moves left of position
*<tt><Rotation>180 90 0</Rotation></tt>: Moves right of position
*<tt><Rotation>270 90 0</Rotation></tt>: Moves above position
*<tt><Rotation>90 90 0</Rotation></tt>: Moves below position


Laser Direction 0<br>
Laser Direction 90:
<Rotation>0 90 0</Rotation> Moves left of position<br>
*<tt><Rotation>0 180 0</Rotation></tt>: Moves left of position
<Rotation>180 90 0</Rotation> Moves right of position<br>
*<tt><Rotation>180 180 0</Rotation></tt>: Moves right of position
<Rotation>270 90 0</Rotation>Moves above position<br>
*<tt><Rotation>270 180 0</Rotation></tt>: Moves above position
<Rotation>90 90 0</Rotation> Moves below position
*<tt><Rotation>90 180 0</Rotation></tt>: Moves below position
 
 
Laser Direction 90<br>
<Rotation>0 180 0</Rotation> Moves left of position<br>
<Rotation>180 180 0</Rotation> Moves right of position<br>
<Rotation>270 180 0</Rotation>Moves above position<br>
<Rotation>90 180 0</Rotation> Moves below position
 
 
Laser Direction 180<br>
<Rotation>0 270 0</Rotation> Moves left of position<br>
<Rotation>180 270 0</Rotation> Moves right of position<br>
<Rotation>270 270 0</Rotation>Moves above position<br>
<Rotation>90 270 0</Rotation> Moves below position<br>


Laser Direction 180:
*<tt><Rotation>0 270 0</Rotation></tt>: Moves left of position
*<tt><Rotation>180 270 0</Rotation></tt>: Moves right of position
*<tt><Rotation>270 270 0</Rotation></tt>: Moves above position
*<tt><Rotation>90 270 0</Rotation></tt>: Moves below position


Laser Direction 270<br>
Laser Direction 270:
<Rotation>0 0 0</Rotation> Moves left of position<br>
*<tt><Rotation>0 0 0</Rotation></tt>: Moves left of position
<Rotation>180 0 0</Rotation> Moves right of position<br>
*<tt><Rotation>180 0 0</Rotation></tt>: Moves right of position
<Rotation>270 0 0</Rotation>Moves above position<br>
*<tt><Rotation>270 0 0</Rotation></tt>: Moves above position
<Rotation>90 0 0</Rotation> Moves below position
*<tt><Rotation>90 0 0</Rotation></tt>: Moves below position


{{XML}}
{{XML}}