Author Topic: Event with key inputs  (Read 1342 times)

I recently wanted to event something with a lot of different triggers on different bricks. Specifically a piano. It is kinda hard to use the mouse to click the different tangents, so I wondered if it was possible to remake it somehow. I came up with this idea:

On a trigger, let's say "onActivate", the player freezes and the key configuration locks. A message appears on the screen saying: "You are now in keyboard mode. Press Q (reconfigurable through RTB or something) to snap out of keyboard mode."

Then, you could use an event called "onKeyPressed -> [(scrolldown menu with all available keys except the one needed to snap out of keyboard mode (Q))]" to remap all keys on your keyboard to do certain things through events. Let me give you an example of how this would work, in this case with the piano:

0. onActivate -> self -> StartKeyboardMode [1
1. onKeyPressed -> ["A"] -> self -> playsound [C4]
2. onKeyPressed -> ["S"] -> self -> playsound [CS4]
3. onKeyPressed -> ["D"] -> self -> playsound [D4]
4. onKeyPressed -> ["F"] -> self -> playsound [DS4]
5. onKeyPressed -> ["G"] -> self -> playsound [E4]
6. onKeyPressed -> ["H"] -> self -> playsound [F4]
etc.

While KeyboardMode is activated, the keys cause some event to happen, instead of what they would normally do (ie. ASD wouldn't cause the player to move). This might require some new, static playertype.

Why would BL need such events? Like shown above, this could be used to create event based instruments. It would also become handy for making event based arcade games or advanced password-protected builds.


I don't know if this is possible, but I think it can be done somehow with new playertypes. Do you think this is a good idea? Did you even understand what I asked for? :P

I highly doubt it is impossible to detect when you press a key on your keyboard.

I highly doubt it is impossible to detect when you press a key on your keyboard.
Indeed. Very unlikely.
Yes, it's very likely dumbass.

I hate global actions for specific bricks. What you suggest, I could hide somewhere on the map and spam buttons to piss everyone off. I don't really know how to explain all the ways this could be fixed and brought down at the same time.

I hate global actions for specific bricks. What you suggest, I could hide somewhere on the map and spam buttons to piss everyone off. I don't really know how to explain all the ways this could be fixed and brought down at the same time.

Quote
While KeyboardMode is activated, the keys cause some event to happen, instead of what they would normally do (ie. ASD wouldn't cause the player to move). This might require some new, static playertype.

Please read.


Uh... Why?
Once the event is activated they can't move anywhere.

And even if you trigger the event long distance... you can already do that.

OnActivate -> Named Brick

Once the event is activated they can't move anywhere.

And even if you trigger the event long distance... you can already do that.

OnActivate -> Named Brick

I use arrow keys to move. I never understood why people used the darn letters. Ever since I began PC gaming, it utterly perplexed me.

I use arrow keys to move. I never understood why people used the darn letters. Ever since I began PC gaming, it utterly perplexed me.
Because the arrow keys are away from other buttons.

If you have them on WASD, you can easily and quickly use QERFZXCV1234 for other controls.

Because the arrow keys are away from other buttons.

If you have them on WASD, you can easily and quickly use QERFZXCV1234 for other controls.

Huh? All of my buttons are around the middle of my keyboard. I don't get what you mean.

Huh? All of my buttons are around the middle of my keyboard. I don't get what you mean.
Are your arrow keys in the middle of your keyboard?

I mean QERFZXCV1234 are near WASD, so it's easy to move and press those buttons at the same time, while being able to turn with the mouse.

Are your arrow keys in the middle of your keyboard?

I mean QERFZXCV1234 are near WASD, so it's easy to move and press those buttons at the same time, while being able to turn with the mouse.

WASD is stuffed up in the top left corner. My arrow keys are just right of center and next to all the important keys.

WASD is stuffed up in the top left corner. My arrow keys are just right of center and next to all the important keys.
This is within one hand reasonable range. Assuming you're holding down any two-button combination of WASD/Arrows.
Keys near WASD:


Keys near arrows:

This is within one hand reasonable range. Assuming you're holding down any two-button combination of WASD/Arrows.
Keys near WASD:
-snip-

Keys near arrows:
-snip-

There's a mountain of stuff on my left side preventing me from angling where as WASD would make any sense. I'd be reaching at odd angles.

There's a mountain of stuff on my left side preventing me from angling where as WASD would make any sense. I'd be reaching at odd angles.
This isn't about why you don't use WASD. This is about why other people use them.

After all this started from
I never understood why people used the darn letters.