Author Topic: OnKeyboardHit  (Read 1791 times)

simple event, OnKeyboardHit (same as OnActivate, only it requires the player to be touching it for it to work) and then a box where you enter one of your keyboard keys, so when you're touching that brick, and you click that button, it activates the event

example:

OnKeyboardHit [ J ] self setcolor

 - when the player is touching the brick, and hits J on his/her keyboard, the brick will change its color to the selected color
« Last Edit: October 01, 2011, 02:58:58 AM by soba »


It's a good idea. How would one be able to make a script that detects keystrokes, though?

This Could Possibly Be Used For Events Like When A Player Is Touching A Vehicle Spawn And They Hit A Certain Key The Vehicle Spawns And They Are Placed Automatically Inside.

This Could Possibly Be Used For Events Like When A Player Is Touching A Vehicle Spawn And They Hit A Certain Key The Vehicle Spawns And They Are Placed Automatically Inside.
OR imagine the blockland computers, or a blockland game!!, say, guitar hero in BL? :D

/support

I suggested this some time ago, but noone knew how to do it. It seems as if this is not possible to do :/

Talked to some of my fellow scripters about it not too long ago, it is possible, to bind the key anyway, not sure about exactly just pressing the key and activating it only when you're touching it

hmmm... But what if you already have the J key bound to something else?

I put my light on the R key for the Stalkers vs Humans tdm.

What would happen if you bound the event to a key in use by the game?

What would happen if you bound the event to a key in use by the game?
I don't want the event to bind the key to anything, just activate when you hit that key, if you hit that key and its already bound to something else, then it will do both, to avoid stuff like OnKeyboardHit>Alt+F4

This would be cool then.

Say you are hiding and have to hit the jump key...

Perhaps a better idea would have a chat-based one.

..How would a chat based one even work?
Type a key? "A Key!" "B Key!" "Enter Key!"

..How would a chat based one even work?
Type a key? "A Key!" "B Key!" "Enter Key!"

Type / then the letter in chat and instead of a chat message it triggers the letter's events.
Or something to that effect.

Type / then the letter in chat and instead of a chat message it triggers the letter's events.
Or something to that effect.

I highly doubt that'd do what he wants.
Hell, what you just suggested already exists, the password events add-on