TRIG

From BFBB Wiki
Jump to: navigation, search
TRIG
Trigger
Type Placeable
Object ID 0x01
Games used Night of 100 Frights
Battle for Bikini Bottom
The SpongeBob SquarePants Movie
The Incredibles
Rise of the Underminer

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.

Format[edit]

Triggers are placeable assets, so they start with their 0x54 byte header, then are followed by:

Offset Type Description
0x54 Vector3 Trigger Position 0
0x60 Vector3 Trigger Position 1
0x6C Vector3 Trigger Position 2
0x78 Vector3 Trigger Position 3
0x84 float Unknown. Usually 0.
0x88 float Unknown. Usually -0.
0x8C float Unknown. Usually 1.
0x90 float Unknown. Usually 0.
Events
0x94 Event[numberOfEvents] Events
  • Trigger types (offset 0x09):
    • 0 - Box
    • 1 - Sphere


  • Trigger Position 0
    • Box - Front, Bottom, Left sides of box (absolute coordinates)
    • Sphere - Center (X, Y, Z) (absolute coordinates)
  • Trigger Position 1
    • Box - Back, Top, Righ sides of box (absolute coordinates)
    • Sphere - X is the sphere's radius. Y and Z are 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)
  • 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)

Events[edit]

Event Description
EnterPlayer EnterPlayer is fired when the Player enters the trigger.
ExitPlayer ExitPlayer is fired when the Player exits the trigger.
EnterEntity EnterEntity is sent from an Entity when it enters the trigger.
ExitEntity EnterEntity is sent from an Entity when it enters the trigger.
Enter SpongeBob Enter SpongeBob is fired at the same time as EnterPlayer if the current playable character is SpongeBob.
Enter Patrick Enter Patrick is fired at the same time as EnterPlayer if the current playable character is Patrick.
Enter Sandy Enter Sandy is fired at the same time as EnterPlayer if the current playable character is Sandy.
Exit SpongeBob Exit SpongeBob is fired at the same time as ExitPlayer if the current playable character is SpongeBob.
Exit Patrick Exit Patrick is fired at the same time as ExitPlayer if the current playable character is Patrick.
Exit Sandy Exit Sandy is fired at the same time as ExitPlayer if the current playable character is Sandy.
EnterCruise
ExitCruise