EvilEngine/TRIG: Difference between revisions

m
Seil moved page TRIG to EvilEngine/TRIG
Battlepedia>Seil
m (Seil moved page TRIG to EvilEngine/TRIG)
 
(10 intermediate revisions by 4 users not shown)
Line 1:
<onlyinclude>
{{AssetInfobox
{{#vardefine:typeid|TRIG}}<nowiki/>
|subtitle=Trigger
{{#vardefine:name|Trigger}}<nowiki/>
|type=[[Placeable]]
{{#vardefine:type|[[Entity]]}}<nowiki/>
|objectid=0x01
{{#vardefine:basetype|0x01}}<nowiki/>
|games=Night of 100 Frights<br>Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles<br>Rise of the Underminer}}
{{#vardefine:games|Scooby BFBB TSSM Incredibles ROTU RatProto}}<nowiki/>
{{#vardefine:sourcecode|[https://github.com/bfbbdecomp/bfbb/blob/master/src/Game/zEntTrigger.h zEntTrigger.h]}}<nowiki/>
{{#vardefine:image|}}<nowiki/>
</onlyinclude>
{{AutoAssetInfobox}}
 
This asset defines an entry for a trigger, a volume of space which can detect what happens within it and send events to other assets accordingly.
 
The triggers have their own position coordinates below, but they use the Position values in the Placeable header as the pivot point for rotation (rotation is done as if that point was the origin). Apparently, all 3 trigger types can be rotated this way.
 
==Format==
Triggers are [[Placeable AssetEntity|placeableentity assets]], so they start with their 0x54 byte header, then are followed by:
 
{| class="wikitable"
! Offset !! Type !! Variable !!Description
|-
|! 0x54 || [[Vector3]]struct (size: 0x30) || Trigger'''p''' Position 0||
|-
| 0x600x54 || [[Vector3]] || Trigger Position 10 ||
|-
| 0x6C0x60 || [[Vector3]] || Trigger Position 21 ||
|-
| 0x780x6C || [[Vector3]] || Trigger Position 32 ||
|-
| 0x840x78 || float[[Vector3]] || Unknown.Trigger UsuallyPosition 0.3 ||
|-
! !! !! !!
| 0x88 || float || Unknown. Usually -0.
|-
| 0x8C0x84 || float[[Vector3]] || Unknown.'''direction''' || Usually (0, -0, 1.)
|-
| 0x90 || floatint || Unknown.'''flags''' || Usually 0.
|-
! colspan="34" | Events
|-
| 0x94 || Event[numberOfEvents] || '''[[Events]]''' ||
|}
 
Line 37 ⟶ 44:
** 0 - Box
** 1 - Sphere
** 2 - Cylinder (unused)
 
** 3 - Sphere (unused, seems to be the same as used Sphere)
 
* Trigger Position 0
** Box - Front, Bottom, Left sides of box (absolute coordinates)
** Sphere - Center (X, Y, Z) (absolute coordinates)
** Cylinder - Bottom? (X, Y, Z) (absolute coordinates)
* Trigger Position 1
** Box - Back, Top, RighRight sides of box (absolute coordinates)
** Sphere - X is the sphere's radius. Y and Z are always 0.
** Cylinder - X is the cylinder's radius. Y is the cylinder's height. Z is probably always 0.
* Trigger Position 2
** Box - Three seemingly random values in the range of 0xCDCDCDB7 to 0xCDCDCDDA. The meaning of this vector is unknown and is probably unused.
** Sphere - Always (0, 0, 0)
** Cylinder - Probably always (0, 0, 0)
* Trigger Position 3
** Box - Three seemingly random values in the range of 0xCDCDCDB7 to 0xCDCDCDDA. The meaning of this vector is unknown and is probably unused.
** Sphere - Always (0, 0, 0)
** Cylinder - Probably always (0, 0, 0)
 
==Events==
Line 80 ⟶ 92:
| '''[[ExitCruise]]''' ||
|}
 
{{Assets}}
{{AutoGameNavs}}
 
[[Category:Asset]]