As always, thank you for supporting The Cutting Room Floor on Patreon!
Notes:SpongeBob SquarePants: Battle for Bikini Bottom (GameCube, PlayStation 2, Xbox)/COND
This is a sub-page of Notes:SpongeBob SquarePants: Battle for Bikini Bottom (GameCube, PlayStation 2, Xbox).
A Conditional (COND) allows you to set up a boolean condition, evaluate the condition at any time during the game, and send different events depending on whether the condition is True or False. It basically acts like an if-then-else statement used in many programming languages, and is very useful to implement logic into levels without having to mess with the source code.
A common use for Conditionals in BFBB is with toll gates and clams, which check your current spatula or shiny object count. If you have enough, the condition is True and whatever events are defined for True are then called (playing the "tada" sound, opening the gate, making the floating digits invisible, etc.). If you don't have enough, the condition is False and whatever events are defined for False are then called (showing the "you need ### spatulas/shiny objects" textbox).
Events
ID | Name | Description |
---|---|---|
0x003C | Evaluate | Evaluates the condition. If true, sends True to self. If false, sends False to self. |
0x003D | True | Received after Evaluate if the condition is true. |
0x003E | False | Received after Evaluate if the condition is false. |
Format
offset | size | type | description |
---|---|---|---|
Header | |||
0x00 | 4 | int | Asset ID |
0x04 | 1 | byte | Asset Type ID (0x1F for COND) |
0x05 | 1 | byte | Number of Events |
0x06 | 2 | short | Unknown Flags |
Condition | |||
0x08 | 4 | int | Value to compare to |
0x0C | 4 | int | Variable ID
|
0x10 | 4 | int | Operator
|
0x14 | 4 | int | Asset ID (optional) |
Event List | |||
0x18 | Event[] | Event List |