Author Topic: Event_BindAction  (Read 9140 times)

Requested here: http://forum.blockland.us/index.php?topic=294345.0

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, 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.

Download
Leopard Hosting
Glass (auto-updates)

Changes:
March 26th, 2016 - Added a built-in cooldown event parameter. This allows you to add delays to the binds without requiring VCE. (if you didn't know, using set/toggle event enabled would disable it for everyone bound to that brick)
« Last Edit: July 11, 2016, 01:28:18 AM by Shift Kitty »


cool...?

it is another 9 keys of interaction

this lets you create events that allow players to proc even faraway contraptions and has fine enough control that you can use it with even extremely complicated things

you could use it to troubleshoot, you could use it in puzzles, you could use it to limit certain activities (by, say, making the player explode when you jump), you can use it with conan's events to make custom toggleable traps or weapons, its literally like a whole new layer of depth

if you don't have anything to say at least don't patronize the guy for adding new functonality

You could even make an entire ability system, possibly with the help of VCE, to right click to use abilities, and even use the numpad to navigate menus.


This add-on is going to be revolutionary for some things
It's like one of those things I've always wanted but never realized it haha
absolutely amazing
« Last Edit: March 20, 2016, 10:59:13 PM by ArmyUnit »

thank you so much for this. myself plus a lot of other people really really wished for this a long time ago

I though this bound an action to any key on the keyboard, like making alt F4 give manual admin or something like that.

None the less it's still a great addon

interesting...

i think this has a lot of potential uses indeed

I though this bound an action to any key on the keyboard, like making alt F4 give manual admin or something like that.

None the less it's still a great addon
While that's not outside the scope of possibility, that would require both a client and server script. Unfortunately for those kinds of things, they rarely get used because clients don't often download them.

Awesome!  I'm thinking this could be used for a pong game that uses 8 and 2 (or something) instead of 2 bricks? Obviously that is a pretty rudimentary implementation :P

i can make tile puzzles now
praise the lord

it is another 9 keys of interaction

this lets you create events that allow players to proc even faraway contraptions and has fine enough control that you can use it with even extremely complicated things

you could use it to troubleshoot, you could use it in puzzles, you could use it to limit certain activities (by, say, making the player explode when you jump), you can use it with conan's events to make custom toggleable traps or weapons, its literally like a whole new layer of depth

if you don't have anything to say at least don't patronize the guy for adding new functonality
It was possible he was just confused lol
This sounds really cool.

Dang, a lot of good events are coming into the add-ons section!

It was possible he was just confused lol
This sounds really cool.

i feel like he just wanted the first post