EvilEngine/BUTN: Difference between revisions

m
Seil moved page BUTN to EvilEngine/BUTN
Battlepedia>Seil
No edit summary
m (Seil moved page BUTN to EvilEngine/BUTN)
 
(24 intermediate revisions by 4 users not shown)
Line 1:
<onlyinclude>
==BUTN==
{{#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.
 
==Format==
Buttons are [[Placeable AssetEntity|placeableentity assets]], so they start with their 0x54 byte header, then are followed by:
 
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x54 || [[AssetID]] || '''modelPressedInfoID''' || Defaults to ModelAssetID in the placeable header (same model for pressed and unpressed).
| 0x54 || [[AssetID]] || ?
|-
| 0x58 || int || '''TypeactMethod''' of button.||
* 0 = SwitchButton - Button staysStays pressed afterupon being hit. (Also has a flashing effect)
* 1 = Pressure Plate - Button staysStays pressed until it stops being hit, then it becomes unpressedunpresses.
|-
| 0x5C || int || null'''initButtonState''' ||
|-
| 0x60 || int || '''Hold EnabledisReset'''. || 0 (disabled) or 1 (enabled). OnlyIf appliesthis to buttons of type Switch. Ifis enabled, whenever the button iswill pressed,automatically itunpress staysitself pressed forafter '''Hold LengthresetDelay''', then it unpresses. Useful(Only forworks timeon challengesButton, ornot anyPressure situationPlate.) where you want the button to only stay pressedUseful for atimed certain amount of timechallenges.
|-
| 0x64 || float || '''Hold LengthresetDelay''' in|| (seconds.) Only appliesTime to buttonswait ofafter typebeing pressed to Switchunpress.
|-
| 0x68 || int || '''buttonActFlags''' || This bitmask specifies what can press the button.
| 0x68 || int || '''Hit Mask'''. This automatically sets up specific types of Hit events to fire ButtonPress for you. For example, if the mask includes Bubble Spin and Bubble Bowl, the button will automatically receive Hit Melee and Hit Bubble Bowl, and send ButtonPress to itself.
* 10x1 - Bubble Spin/Sliding (SpongeBob)
* 20x2 - Bubble Bounce
* 40x4 - Bubble Bash
* 80x8 - [[BOUL|Boulder]]/Bubble Bowl
* 160x10 - Cruise Bubble
* 0x20 - Bungee
* ...
* 0x40 - Thrown Enemy/Tiki
* 0x80 - Throw Fruit
* 0x100 - Patrick Slam
* 0x200 - Unknown
* 0x400 - (Pressure Plate) Player Stand
* 0x800 - (Pressure Plate) Enemy Stand
* 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)
* The rest of the bits are unused.
|-
| 0x6C || byte[8[Motion]] || Unknown.'''Motion''' || Always type 4 (Mechanism)
|-
! colspan="34" | Events
| 0x74 || Vector2 || Unknown.
|-
| 0x9C || Event[numberOfEvents] || '''[[Events]]''' || '''BFBB'''
| 0x7C || int[8] || Unknown (null?)
|-
| 0xA8 || Event[numberOfEvents] || '''[[Events]]''' || '''Movie'''
! colspan="3" | Events
|-
| 0x9C || Event[numberOfEvents] || '''[[Events]]'''
|}
 
=== Events ===
 
{{Assets}}
{{AutoGameNavs}}
 
[[Category:Asset]]