Essentials Series/Buttons: Difference between revisions

no edit summary
Battlepedia>Igorseabra4
(Created page with "{{EssentialsSeriesBox}} This page is part of the Essential Series modding tutorials. A '''Button''' (BUTN) is an entity asset that creates a model i...")
 
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1:
{{EssentialsSeriesBox}}
This page is part of the Essential Series modding tutorials. A '''Button''' ([[BUTN]]) is an [[Asset#Entity Asset|entity asset]] that creates a model in the world and is specialized at sending or receiving [[../Links/|events]] depending on interaction with the player. Everything that applies to [[../SIMPs/]] also applies to buttons, such as the visibility and collision states, events and Drivenby. BUTNs are usually found in the Default layer of the level's HIP.
 
== Using Buttons ==
=== Red Button and Pressure Plate ===
[[Industrial Park (level editor)|Industrial Park]] has [[../Asset Templates/|templates]] for the red button, which is common in BFBB, and the pressure plate. You can place these templates, but you need to have [[../Tikis and Enemies/#Importing HIPs|imported]] the button or pressure plate HIPs to the stage's HOP first.
 
After placing the button, there are a few settings in its [[../Editing Assets/#Asset Data Editor|Asset Data Editor]] you might want to change:
* ResetAfterDelay: this only applies to buttons (not pressure plates). If true, the button will unpress after the time specified in ResetDelay.
* Button Hitmask: this is a list of actions which may activate the button. You can set it to only be activated by specific moves. They are independent of the asset being a button or pressure plate, so if you set PlayerOnPressurePlate to true on a button, it will activate when you step on it!
Line 17:
The basic difference between a button and a pressure plate, regardless of model, is that buttons stay pressed when their hitmask is activated (possibly resetting only after the delay if specified to). Pressure plates reset immediately once you stop hitting it. You could make a pressure plate use the BubbleSpin hit flag, for example. The button would press when you hit it with the attack, and immediately unpress when the attack ends. Buttons also have a flashing effect overlayed on the model when they are unpressed.
 
==== Motion ====
The Motion section of the button is identical to a [[../Platforms/#Mechanism|Mechanism platform's]]. You can use this to set how the button will move when pressed. [[../Platforms/#Movement Preview|Movement Preview]] will preview the button's movement.
 
== Events ==
All [[../SIMPs/#Events|events which work for SIMPs]] function the same way on BUTNs.
 
* '''ButtonPress''': this is sent to the button when it is pressed. You can also send this to the button to press it from another asset.
Line 28:
Note that sending '''Disable''' to a button will not make it invisible or unsolid, but simply unable to be pressed.
 
[[Category:Modding]] [[Category:Tutorials]]