EvilEngine/BUTN: Difference between revisions
Content added Content deleted
Battlepedia>Seil mNo edit summary |
m (Seil moved page BUTN to EvilEngine/BUTN) |
||
(16 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude> |
|||
{{#vardefine:typeid|BUTN}}<nowiki/> |
|||
{{#vardefine:name|Button}}<nowiki/> |
|||
{{#vardefine:type|[[Entity]]}}<nowiki/> |
|||
{{#vardefine:basetype|0x18}}<nowiki/> |
|||
{{#vardefine:games|Scooby BFBB TSSM Incredibles}}<nowiki/> |
|||
{{#vardefine:sourcecode|[https://github.com/bfbbdecomp/bfbb/blob/master/src/Game/zEntButton.h zEntButton.h]}}<nowiki/> |
|||
{{#vardefine:image|Buttons.png}}<nowiki/> |
|||
</onlyinclude> |
|||
{{AutoAssetInfobox}} |
|||
This asset defines an entry for buttons such as switches and pressure plates. |
This asset defines an entry for buttons such as switches and pressure plates. |
||
==Format== |
==Format== |
||
Buttons are [[ |
Buttons are [[Entity|entity assets]], so they start with their 0x54 byte header, then are followed by: |
||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Type !! Description |
! Offset !! Type !! Variable !! Description |
||
|- |
|- |
||
| 0x54 || [[AssetID]] || ''' |
| 0x54 || [[AssetID]] || '''modelPressedInfoID''' || Defaults to ModelAssetID in the placeable header (same model for pressed and unpressed). |
||
|- |
|- |
||
| 0x58 || int || ''' |
| 0x58 || int || '''actMethod''' || |
||
* 0 = |
* 0 = Button - Stays pressed upon being hit. (Also has a flashing effect) |
||
* 1 = Pressure Plate - |
* 1 = Pressure Plate - Stays pressed until it stops being hit, then unpresses. |
||
|- |
|- |
||
| 0x5C || int || |
| 0x5C || int || '''initButtonState''' || |
||
|- |
|- |
||
| 0x60 || int || ''' |
| 0x60 || int || '''isReset''' || 0 (disabled) or 1 (enabled). If this is enabled, the button will automatically unpress itself after '''resetDelay'''. (Only works on Button, not Pressure Plate.) Useful for timed challenges. |
||
|- |
|- |
||
| 0x64 || float || ''' |
| 0x64 || float || '''resetDelay''' || (seconds) Time to wait after being pressed to unpress. |
||
|- |
|- |
||
| 0x68 || int || '''buttonActFlags''' || This bitmask specifies what can press the button. |
|||
| 0x68 || int || '''Hit Mask'''. This specifies the different ways the button can be hit. If this is 0, the button by default doesn't react to any Hit events. For each bit you include in this mask, a corresponding Hit event will automatically be set up to fire ButtonPress for you. For example, if the mask includes Bubble Spin and Bubble Bowl, the button will automatically fire ButtonPress when it receives either Hit Melee or Hit Bubble Bowl. |
|||
* |
* 0x1 - Bubble Spin/Sliding (SpongeBob) |
||
* |
* 0x2 - Bubble Bounce |
||
* |
* 0x4 - Bubble Bash |
||
* |
* 0x8 - [[BOUL|Boulder]]/Bubble Bowl |
||
* |
* 0x10 - Cruise Bubble |
||
* |
* 0x20 - Bungee |
||
* 0x40 - Thrown Enemy/Tiki |
|||
* 6 - |
|||
* |
* 0x80 - Throw Fruit |
||
* |
* 0x100 - Patrick Slam |
||
* |
* 0x200 - Unknown |
||
* |
* 0x400 - (Pressure Plate) Player Stand |
||
* 0x800 - (Pressure Plate) Enemy Stand |
|||
* 11 - |
|||
* |
* 0x1000 - (Pressure Plate) [[BOUL|Boulder]]/Bubble Bowl |
||
* |
* 0x2000 - (Pressure Plate) Stone Tiki |
||
* |
* 0x4000 - Sandy Melee/Sliding |
||
* |
* 0x8000 - Patrick Melee/Sliding |
||
* |
* 0x10000 - (Pressure Plate) Throw Fruit |
||
* 0x20000 - Patrick Cartwheel (TSSM only, unused in BFBB) |
|||
* 17 - |
|||
* The rest of the bits are unused. |
|||
* 18 - |
|||
* 19 - |
|||
* 20 - |
|||
* 21 - |
|||
* 22 - |
|||
* 23 - |
|||
* 24 - |
|||
* 25 - |
|||
* 26 - |
|||
* 27 - |
|||
* 28 - |
|||
* 29 - |
|||
* 30 - |
|||
* 31 - |
|||
|- |
|- |
||
| 0x6C || |
| 0x6C || [[Motion]] || '''Motion''' || Always type 4 (Mechanism) |
||
|- |
|- |
||
⚫ | |||
| 0x74 || float || '''Y Offset''' of button during its pressed state. |
|||
|- |
|- |
||
⚫ | |||
| 0x78 || float || '''Transition time''' in seconds between its unpressed and pressed states. |
|||
|- |
|- |
||
| |
| 0xA8 || Event[numberOfEvents] || '''[[Events]]''' || '''Movie''' |
||
|- |
|||
| 0x84 || int[6] || null |
|||
|- |
|||
⚫ | |||
|- |
|||
⚫ | |||
|} |
|} |
||
=== Events === |
=== Events === |
||
{{Assets}} |
|||
{{AutoGameNavs}} |
|||
[[Category:Asset]] |
[[Category:Asset]] |
Latest revision as of 22:33, 15 September 2022
BUTN | |
---|---|
Button | |
Type | Entity |
Base Type | 0x18 |
Games used | Night of 100 Frights Battle for Bikini Bottom |
Source code | zEntButton.h |
This asset defines an entry for buttons such as switches and pressure plates.
Format
Buttons are entity assets, so they start with their 0x54 byte header, then are followed by:
Offset | Type | Variable | Description |
---|---|---|---|
0x54 | AssetID | modelPressedInfoID | Defaults to ModelAssetID in the placeable header (same model for pressed and unpressed). |
0x58 | int | actMethod |
|
0x5C | int | initButtonState | |
0x60 | int | isReset | 0 (disabled) or 1 (enabled). If this is enabled, the button will automatically unpress itself after resetDelay. (Only works on Button, not Pressure Plate.) Useful for timed challenges. |
0x64 | float | resetDelay | (seconds) Time to wait after being pressed to unpress. |
0x68 | int | buttonActFlags | This bitmask specifies what can press the button.
|
0x6C | Motion | Motion | Always type 4 (Mechanism) |
Events | |||
0x9C | Event[numberOfEvents] | Events | BFBB |
0xA8 | Event[numberOfEvents] | Events | Movie |