XML:BINA/OBJC/TRIG: Difference between revisions
Paradox-01 (talk | contribs) m (trigger speed = OBAN * factor in file * factor via BSL) |
Paradox-01 (talk | contribs) (style update) |
||
Line 92: | Line 92: | ||
===tags=== | ===tags=== | ||
{| class="wikitable" width="100%" | |||
!width=280px| tag | |||
!width=60px| type | |||
! description | |||
|- | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| float, flag | |||
| Don't change this. | |||
|- | |||
| <Oni> | |||
| - | |||
| | |||
|- | |||
| <TRIG Id="..."> | |||
:: | | integer | ||
| You can also use <TRIG> without the id parameter. | |||
|- | |||
| <Header> | |||
: | | - | ||
: | | | ||
: | |- | ||
| <Flags> | |||
| | |||
| Used in the past. | |||
|- | |||
| <Position> | |||
| float x3 | |||
| trigger is spawned at this xyz-position | |||
|- | |||
| float x3 | |||
| <Rotation> | |||
| trigger has this xyz-rotation (in degrees) | |||
|- | |||
| <OSD> | |||
: | | - | ||
| | |||
|- | |||
|valign="top"| <Class> | |||
|valign="top"| char[63] | |||
| <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)). | |||
original classes: | |||
: trigger_arc | |||
: trigger_circle | |||
: trigger_evilbrain | |||
: trigger_long | |||
: trigger_long4x | |||
: trigger_long4xzag | |||
: trigger_rectangle | |||
: trigger_sb3A | |||
: trigger_sb3B | |||
: trigger_short | |||
|- | |||
| <TriggerId> | |||
| int16 | |||
| Used by BSL commands. Is it possible to use the same id for different triggers? | |||
|- | |||
|valign="top"| <Flags> | |||
|valign="top"| flags | |||
| | |||
: InitialActive | |||
: ReverseAnim | |||
: PingPong | |||
|- | |||
|valign="top"| <LaserColor> | |||
|valign="top"| color | |||
| [[wikipedia:RGB_color_model#The_24-bit_RGB_representation|R G B]] range, e.g. <LaserColor>255 0 77</LaserColor> | |||
|- | |||
| <StartPosition> | |||
| 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) | |||
|- | |||
|valign="top"| <Speed> | |||
|valign="top"| float | |||
| This is one for two multiplier. The second multiplier can be accessed via BSL command ''trig_speed id speed''. | |||
total_speed = OBAN_speed * multiplier_in_file * multiplier_BSL | |||
So if one of the multiplier is set to 0, the trigger will stop moving. | |||
|- | |||
| <EmitterCount> | |||
| int16 | |||
| Number of emitter to spawn on the rail? | |||
|- | |||
| <TimeOn> | |||
| int16 | |||
| laser is emitting its beam for X frames | |||
|- | |||
| <TimeOff> | |||
| int16 | |||
| laser is not emitting its beam for X frames | |||
|- | |||
| <Events> | |||
| - | |||
| in16 array. You can use multiple events. | |||
|- | |||
|valign="top"| <Script Function="call_this_BSL_function" /> | |||
|valign="top"| char[32] | |||
| Name of BSL function. For example if you use "call_this_BSL_function" here then write in BSL file: | |||
''func call_this_BSL_function | |||
{ | |||
dmsg "hi" | |||
}'' | |||
|- | |||
| <ActivateTurret TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <DeactivateTurret TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <ActivateConsole TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <DeactivateConsole TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <ActivateAlarm TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <DeactivateAlaram TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <ActivateTrigger TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <DeactivateTrigger TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <LockDoor TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|- | |||
| <UnlockDoor TargetId="''Id''" /> | |||
| int16 | |||
| | |||
|} | |||
Revision as of 23:17, 30 December 2013
TRIG : Trigger spawn collection | ||
---|---|---|
XML
AKEV << Other file types >> CONS TMBD << Other BINA >> ONIE TRGV << Other OBJC >> TURR |
general information
- The xml code on this page is based on onisplit v0.9.61.0
- BINACJBOTrigger.oni is level specific. (It can be found in AE/AEInstaller/vanilla/levelX_Final.dat)
- Extract this file if an update on xml tags is needed.
BSL support
command | description | example |
---|---|---|
marketing_line_off | turns the laser line off | marketing_line_off = 1 |
trig_activate trigger_id:int | activates a trigger | trig_activate 2 |
trig_deactivate trigger_id:int | deactivates a trigger | trig_deactivate 2 |
trig_hide trigger_id:int | hides a trigger, disables also laser | trig_hide 91 |
trig_show trigger_id:int | shows a trigger | trig_show 91 |
trig_speed trigger_id:int volume:float | sets a triggers speed | trig_speed 514 .15 |
trig_reset trigger_id:int | resets a trigger to non-triggered state | trig_reset 91 |
file structure
<?xml version="1.0" encoding="utf-8"?> <Oni> <Objects> [...] </Objects> </Oni>
[...] means at least one trigger. Paste all trigger data into there (this includes <TRIG Id="..."> and </TRIG> tag).
example
<TRIG Id="8136"> <Header> <Flags></Flags> <Position>-445 68 -1362</Position> <Rotation>270 8.65141646E-06 180.000015</Rotation> </Header> <OSD> <Class>trigger_long</Class> <TriggerId>1</TriggerId> <Flags>44</Flags> <LaserColor>0 0 255</LaserColor> <StartPosition>0</StartPosition> <Speed>0</Speed> <EmitterCount>3</EmitterCount> <Offset_0075>0</Offset_0075> <Offset_0077>0</Offset_0077> <Events> <Script Function="calling_this_BSL_function" /> <ActivateTurret TargetId="1" /> <DeactivateTurret TargetId="2" /> <ActivateConsole TargetId="3" /> <DeactivateConsole TargetId="4" /> <ActivateAlarm TargetId="5" /> <DeactivateAlaram TargetId="6" /> <ActivateTrigger TargetId="7" /> <DeactivateTrigger TargetId="8" /> <LockDoor TargetId="9" /> <UnlockDoor TargetId="10" /> </Events> </OSD> </TRIG>
tags
tag | type | description |
---|---|---|
<?xml version="1.0" encoding="utf-8"?> | float, flag | Don't change this. |
<Oni> | - | |
<TRIG Id="..."> | integer | You can also use <TRIG> without the id parameter. |
<Header> | - | |
<Flags> | Used in the past. | |
<Position> | float x3 | trigger is spawned at this xyz-position |
float x3 | <Rotation> | trigger has this xyz-rotation (in degrees) |
<OSD> | - | |
<Class> | char[63] | TRIGfile.oni
This is a link to TRIG (trigger class), which holds the M3GM of the rail and links to TREG (laser emitter class) and OBAN (animation of the emitters)). original classes:
|
<TriggerId> | int16 | Used by BSL commands. Is it possible to use the same id for different triggers? |
<Flags> | flags |
|
<LaserColor> | color | R G B range, e.g. <LaserColor>255 0 77</LaserColor> |
<StartPosition> | 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) |
<Speed> | float | This is one for two multiplier. The second multiplier can be accessed via BSL command trig_speed id speed.
total_speed = OBAN_speed * multiplier_in_file * multiplier_BSL So if one of the multiplier is set to 0, the trigger will stop moving. |
<EmitterCount> | int16 | Number of emitter to spawn on the rail? |
<TimeOn> | int16 | laser is emitting its beam for X frames |
<TimeOff> | int16 | laser is not emitting its beam for X frames |
<Events> | - | in16 array. You can use multiple events. |
<Script Function="call_this_BSL_function" /> | char[32] | Name of BSL function. For example if you use "call_this_BSL_function" here then write in BSL file:
func call_this_BSL_function { dmsg "hi" } |
<ActivateTurret TargetId="Id" /> | int16 | |
<DeactivateTurret TargetId="Id" /> | int16 | |
<ActivateConsole TargetId="Id" /> | int16 | |
<DeactivateConsole TargetId="Id" /> | int16 | |
<ActivateAlarm TargetId="Id" /> | int16 | |
<DeactivateAlaram TargetId="Id" /> | int16 | |
<ActivateTrigger TargetId="Id" /> | int16 | |
<DeactivateTrigger TargetId="Id" /> | int16 | |
<LockDoor TargetId="Id" /> | int16 | |
<UnlockDoor TargetId="Id" /> | int16 |
laser movements
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
Laser Direction 0
<Rotation>0 90 0</Rotation> Moves left of position
<Rotation>180 90 0</Rotation> Moves right of position
<Rotation>270 90 0</Rotation>Moves above position
<Rotation>90 90 0</Rotation> Moves below position
Laser Direction 90
<Rotation>0 180 0</Rotation> Moves left of position
<Rotation>180 180 0</Rotation> Moves right of position
<Rotation>270 180 0</Rotation>Moves above position
<Rotation>90 180 0</Rotation> Moves below position
Laser Direction 180
<Rotation>0 270 0</Rotation> Moves left of position
<Rotation>180 270 0</Rotation> Moves right of position
<Rotation>270 270 0</Rotation>Moves above position
<Rotation>90 270 0</Rotation> Moves below position
Laser Direction 270
<Rotation>0 0 0</Rotation> Moves left of position
<Rotation>180 0 0</Rotation> Moves right of position
<Rotation>270 0 0</Rotation>Moves above position
<Rotation>90 0 0</Rotation> Moves below position