Keyboard events- press & depress

Rushhour

New Member
Reaction score
46
Hi there, I know the only way to detect keys other than escape, arrow keys (and spacebar) is by adding hotkeys to abilities of units. But this wouldn't be enough, since I would then need a way to detect when the key isn't pressed anymore.
I need the arrow keys for movement, so can anyone think of something?

And yes I have a fixed camera field so the spacebar wouldn't work too since you can only register camera change that comes with spacebar^^
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Melee Initialization
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
      • Player - Player 1 (Red) Presses the Right Arrow key
      • Player - Player 1 (Red) Presses the Down Arrow key
      • Player - Player 1 (Red) Presses the Up Arrow key
    • Conditions
    • Actions

Its all under events -> player -> keyboard event
I believe
 

Wratox1

Member
Reaction score
22
Trigger:
  • Melee Initialization
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
      • Player - Player 1 (Red) Presses the Right Arrow key
      • Player - Player 1 (Red) Presses the Down Arrow key
      • Player - Player 1 (Red) Presses the Up Arrow key
    • Conditions
    • Actions

Its all under events -> player -> keyboard event
I believe

yes and there is one release event for each arrow key also
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Yes Wratox is right there are (i forgot and didnt read the post xD)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
*Some1 who knows Jass corrects the above statement*
Lol i dont think its possible in GUI but im sure Jass has ways of doing it.
 

Anachron

New Member
Reaction score
53
I know the only way to detect keys other than escape, arrow keys (and spacebar) is by adding hotkeys to abilities of units. But this wouldn't be enough
Seriously guys, do you even read the question? He already knows that.
But sadly no, there is no way to detect keyboard events else.
 

Anachron

New Member
Reaction score
53
Yes, but he already knows how to manage arrow key presses and releasing, he just wants the normal keys to be registered.
 

Rushhour

New Member
Reaction score
46
Anachron is right, but I didn't make it 100% clear in my first post, so my fault too ;)

I will try something out. Mainly what happens if player presses a key, lets say T, that is the hotkey for a dummy ability. Maybe this already fires "starts casting an abillity-event" . And then I will test what happens if I order that unit to cast the ability, maybe this results in some positive effect, I will see :D
 

BlueMirage

Trust, but doubt.
Reaction score
39
Wierd that there isn't an event that detects button presses when there is an action that enforces them.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top