Essentials Series/Buttons: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
m (3 revisions imported)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{EssentialsSeriesBox}}
{{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.
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 ==
== Using Buttons ==
=== Red Button and Pressure Plate ===
=== 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.
[[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:
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.
* 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!
* 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 18: Line 18:


=== Motion ===
=== 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.
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 ==
== Events ==
All [[SIMPs#Events|events which work for SIMPs]] function the same way on BUTNs.
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.
* '''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: Line 28:
Note that sending '''Disable''' to a button will not make it invisible or unsolid, but simply unable to be pressed.
Note that sending '''Disable''' to a button will not make it invisible or unsolid, but simply unable to be pressed.


[[Category:Modding]] [[Category:Tutorials]]
[[Category:Tutorials]]

Latest revision as of 16:12, 29 April 2021

Essentials Series
  1. Introduction
  2. Industrial Park basics
  3. Editing Assets
  4. Templates
  5. Links
  6. Dispatchers
  7. Tikis and Enemies

This page is part of the Essential Series modding tutorials. A Button (BUTN) is an entity asset that creates a model in the world and is specialized at sending or receiving 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 has templates for the red button, which is common in BFBB, and the pressure plate. You can place these templates, but you need to have imported the button or pressure plate HIPs to the stage's HOP first.

After placing the button, there are a few settings in its 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!

You can also change the model of the buttons.

Generic Button

Industrial Park has a Generic Button template. After placing the template, you need to assign it the Model_AssetID of the MODL you want to use, possibly a separate PressedModel_AssetID and other settings yourself.

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 Mechanism platform's. You can use this to set how the button will move when pressed. Movement Preview will preview the button's movement.

Events

All 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.
  • ButtonUnpress: this is sent to the button when it is unpressed, after its ResetDelay if specified to, or when it stops being hit if it's a pressure plate. You can also send it to the button to unpress it from another asset.

Note that sending Disable to a button will not make it invisible or unsolid, but simply unable to be pressed.