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)
 
(15 intermediate revisions by 4 users not shown)
Line 1:
<onlyinclude>
{{AssetInfobox
{{#vardefine:typeid|BUTN}}<nowiki/>
|subtitle=Button
{{#vardefine:name|Button}}<nowiki/>
|type=[[Placeable]]
{{#vardefine:type|[[Entity]]}}<nowiki/>
|objectid=0x18
{{#vardefine:basetype|0x18}}<nowiki/>
|games=Night of 100 Frights<br>Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles}}
{{#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]] || '''PressedmodelPressedInfoID''' model.|| Defaults to the modelModelAssetID in the placeable header (same model for pressed and unpressed).
|-
| 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 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.
* 00x1 - Bubble Spin/Sliding (SpongeBob)
* 10x2 - Bubble Bounce
* 20x4 - Bubble Bash
* 30x8 - [[BOUL|Boulder]]/Bubble Bowl
* 40x10 - Cruise Bubble
* 50x20 - Bungee
* 0x40 - Thrown Enemy/Tiki
* 6 -
* 70x80 - ThrowableThrow Fruit
* 80x100 - Patrick Slam
* 90x200 - Unknown
* 100x400 - (Pressure Plate) Player Stand
* 0x800 - (Pressure Plate) Enemy Stand
* 11 -
* 120x1000 - Bubble Bowl (Pressure Plate) [[BOUL|Boulder]]/Bubble Bowl
* 130x2000 - Throwable (Pressure Plate) Stone Tiki
* 140x4000 - Sandy Melee/Sliding
* 150x8000 - Patrick BellyMelee/Sliding
* 160x10000 - Throw Fruit (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 || byte[8[Motion]] || Unknown.'''Motion''' Usually|| Always type 4,0,0,4,2,1,1,0 (Mechanism)
|-
! colspan="34" | Events
| 0x74 || float || '''Y Offset''' of button during its pressed state.
|-
| 0x9C || Event[numberOfEvents] || '''[[Events]]''' || '''BFBB'''
| 0x78 || float || '''Transition time''' in seconds between its unpressed and pressed states.
|-
| 0x7C0xA8 || floatEvent[2numberOfEvents] || '''Transition[[Events]]''' Ease|| In/Out modifiers'''.Movie'''
|-
| 0x84 || int[6] || null
|-
! colspan="3" | Events
|-
| 0x9C || Event[numberOfEvents] || '''[[Events]]'''
|}
 
=== Events ===
 
{{Assets}}
{{AutoGameNavs}}
 
[[Category:Asset]]