2023-05-21: Yes, we're back. No, you can't login yet

Event Bind Action

Uploaded by nul

The add-on board icon. Events
The add-on file name icon. Event_BindAction.zip
The add-on upload date icon. Apr 7th 2016, 1:27 AM
The add-on download count icon. 1,223

Description

Includes two input events and three output events which allow you to trigger events when the player performs certain actions.

Inputs: onActionDown - When the button is pressed. Works for all actions. onActionUp - When the button is released. Only works for fire, jump, crouch, and jet.

Outputs: Bricks: playerActionBind [list] [cd] - Binds a player's action to the targeted brick(s). When the player does (or stops) that action, onActionDown/Up is triggered on that brick. playerActionUnbind [list] - Reverses the effect of the above event. playerActionUnbindAll - Removes every single bind the player has.

[list] contains: Fire, Jump, Crouch, Jet, Light, PrevSeat, NextSeat, UseTool, UnUseTool, BrickCancel, BrickDownPlate, BrickToward, BrickUpPlate, BrickLeft, BrickDown, BrickRight, BrickRotateCCW, BrickAway, BrickCW, BrickUp, BrickPlant

Note #1: These are bound to the player, not the client. So when the player respawns or dies, all binds are cleared. Note #2: If an action has a cooldown, onActionUp will only be called if onActionDown was successfully called.

Comments (0)