XML:BINA/OBJC/TRGV: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
m (Iritscen moved page OBD talk:BINA/OBJC/TRGV to XML:BINA/OBJC/TRGV without leaving a redirect)
(+ temp + cat)
Line 1: Line 1:
=[[OBD:BINA/OBJC/TRGV|BINA/OBJC/TRGV]]: trigger volumes (TV)=
{{XML_OBJC_Header | type=TRGV | prev=TRIG | next=SNDG | name=Trigger Volumes (TVs) }}


{{Template:XMLModdingHints}}
===general information===
{| border=0 cellspacing=20 cellpadding=0 align=center
| The xml code on this page is based on onisplit '''v0.9.61.0'''
|}
 
'''general information'''
* '''BINACJBOTrigger Volume.oni''' is level specific. (It can be found in edition/GameDataFolder/level''XX''_... )
* '''BINACJBOTrigger Volume.oni''' is level specific. (It can be found in edition/GameDataFolder/level''XX''_... )
* The xml code on this page is based on onisplit '''v0.9.61.0'''


 
===file structure===
'''XML structure'''
{|width=200px border=0 cellspacing=20 cellpadding=0 style="float:right"
<?xml version="1.0" encoding="utf-8"?>
<Oni>
    <Objects>
        '''''[...]'''''
    </Objects>
</Oni>
 
'''''[...]''''' means at least one trigger volumen. Paste all tv data into there (this includes '''<font color="#0A0"><TRGV Id="..."></font>''' and '''<font color="#0A0"></TRGV></font>''' tag).
 
'''example'''
{|width=200px border=0 cellspacing=20 cellpadding=0 align=right
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/trigger_volume.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/trigger_volume_preview.jpg]
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/trigger_volume.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/trigger_volume_preview.jpg]


Line 34: Line 19:
* chr_location 0 ''x y z''
* chr_location 0 ''x y z''
|}
|}
<?xml version="1.0" encoding="utf-8"?>
<Oni>
    <Objects>
        '''''[...]'''''
    </Objects>
</Oni>
'''''[...]''''' means at least one trigger volume. Paste all tv data into there (this includes '''<font color="#0A0"><TRGV Id="..."></font>''' and '''<font color="#0A0"></TRGV></font>''' tag).
'''example'''
         '''<font color="#0A0"><TRGV Id="7383"></font>'''
         '''<font color="#0A0"><TRGV Id="7383"></font>'''
             <Header>
             <Header>
Line 61: Line 57:
  - 633.4166 + 46  = -587.4166 = z_blue_line_end
  - 633.4166 + 46  = -587.4166 = z_blue_line_end


'''tags'''
 
===tags===
* <Flags>
* <Flags>
:: Locked
:: Locked
Line 100: Line 97:
'''Resetting the trigger volume'''
'''Resetting the trigger volume'''
:'''trigvolume_reset(string tv_name)''' resets the TV to its preset state. The primary use of this is to re-enable "entry", "inside" or "exit" calls once the TV has been triggered (only necessary if the respective trigger-only-once flags are set of course). Note that some or all the TV functions are disabled at level load, you'll have to enable them manually after resetting the TV.
:'''trigvolume_reset(string tv_name)''' resets the TV to its preset state. The primary use of this is to re-enable "entry", "inside" or "exit" calls once the TV has been triggered (only necessary if the respective trigger-only-once flags are set of course). Note that some or all the TV functions are disabled at level load, you'll have to enable them manually after resetting the TV.
{{XML}}

Revision as of 12:31, 9 November 2012

TRGV : Trigger Volumes (TVs)
XML modding tips
See HERE to start learning about XML modding.
See HERE if you are searching for information on how to handle object coordinates.
See HERE for some typical modding errors and their causes.
XML.png
XML

AKEV << Other file types >> CONS

TMBD << Other BINA >> ONIE

TRIG << Other OBJC >> SNDG

switch to OBD page

general information

  • BINACJBOTrigger Volume.oni is level specific. (It can be found in edition/GameDataFolder/levelXX_... )
  • The xml code on this page is based on onisplit v0.9.61.0

file structure

trigger_volume_preview.jpg

The red and blue lines were added to the screenshot in a graphics program, not by debug_triggers.

If you have an updated Oni Mac engine, the TVs can be made visible.

Used BSL commands:

  • debug_triggers = 1
  • chr_nocollision 0 1
  • chr_debug_characters = 1
  • chr_location 0 x y z
<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Objects>
       [...]
   </Objects>
</Oni>

[...] means at least one trigger volume. Paste all tv data into there (this includes <TRGV Id="..."> and </TRGV> tag).

example

       <TRGV Id="7383">
           <Header>
               <Flags>Locked</Flags>
               <Position>-651.5666 -298 -633.4166</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Name>trigger_volume_46</Name>
               <Scripts>
                   <Entry>train_block2</Entry>
                   <Inside></Inside>
                   <Exit>block_path</Exit>
               </Scripts>
               <Teams>255</Teams>
               <Size>46 31 46</Size>
               <TriggerVolumeId>46</TriggerVolumeId>
               <ParentId>0</ParentId>
               <Notes></Notes>
               <Flags>PlayerOnly</Flags>
           </OSD>
       </TRGV>
start      + size = end
- 651.5666 + 46   = -605.5666 = x_blue_line_end
- 298      + 31   = -267      = y_blue_line_end
- 633.4166 + 46   = -587.4166 = z_blue_line_end


tags

  • <Flags>
Locked
  • <Position> : (a volume corner)
  • <Rotation> : (xyz-rataion in degrees)
  • <Name> : (can have up to 63 characters)
  • <Scripts> : (BSL functions; each can have up to 32 characters)
<Entry> : (called up when character enters the TV)
<Inside> : (called while character is inside the TV)
(This one is triggered at every frame (60 times per second) unless the trigger-only-once flag is set. Continuous triggering is typically needed for fire or gas damage.)
<Exit> : (called up when character leaves the TV)
  • <Teams>
1 - Konoko
2 - TCTF
4 - Syndicate
8 - Neutral
16 - SecurityGuard
32 - RogueKonoko
64 - Switzerland
128 - SyndicateAccessory
(every combination is possible)
255 - all teams (1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255)
  • <Size> : (volume)
  • <TriggerVolumeId> : (used by BSL command "trigvolume_corpse ID")
  • <ParentId> : ...
  • <Notes> : (space for 128 characters)
  • <Flags>
OneTimeEnter - entry function called only once (otherwise called every time character enters the TV)
OneTimeInside - inside function called only once (otherwise called at every frame while character is in the TV)
OneTimeExit - exit function called only once (otherwise called every time character leaves the TV)
EnterDisabled - entry function disabled (can be enabled with "trigvolume_enable tv_name entry 1")
InsideDisabled - inside function disabled (can be enabled with "trigvolume_enable tv_name inside 1")
ExitDisabled - exit function disabled (can be enabled with "trigvolume_enable tv_name exit 1")
Disabled - all 3 functions disabled (master switch, can be enabled with "trigvolume_enable tv_name all 1")
PlayerOnly - only player characters can fire off the TV


Resetting the trigger volume

trigvolume_reset(string tv_name) resets the TV to its preset state. The primary use of this is to re-enable "entry", "inside" or "exit" calls once the TV has been triggered (only necessary if the respective trigger-only-once flags are set of course). Note that some or all the TV functions are disabled at level load, you'll have to enable them manually after resetting the TV.