• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

is it possible to work with the following keyboard events?

Status
Not open for further replies.
Level 14
Joined
Apr 20, 2009
Messages
1,543
w, a, s, d, shift, space, l, k, j

if it is possible:

is it done in jass, gui, vjass?
and if it can be done, can someone be kind enough to give me a link to it if that person knows a link to a thread like it: I have tryed searching....
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
By that you mean moving?If yes there is an arrow moving system on THW.
Or if you mean spell you could just use "KEybord event-Player Pressed Shift" unit(trigering unit owned by Player X) issuse order to cast X Spell or such :S
If you mean something else,then i dunno what to say :(

KEybord event-Player Pressed Shift

thats exactly what I want but the information you just gave me is incorrect, there is no event like that mate :)

So I was asking if there is someone who made an event like that in jass for example or maybe even in gui...

you can only use the following keyboard events via triggers:
left, up, down, right arrow keys

But I want to use more then that and I'm asking if it is possible to make something like that in gui or jass or vjass

(I already have a movement system but it works with arrow keys and I want to use w, a, s, d)
for the other keyboard events I want to make something like: whenever space is pressed a unit jumps
or whenever k is pressed a unit attacks once, or whenever shift is pressed the unit is defending... etc...
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I know that Pirate Tag uses IJKL for movement. Don't think it's open source though; you can always check.

You could try using reinventing the craft although that might be a bit of a hassle.

I don't really like RtC but thanks for the suggestion :)
I'll check pirate tag out...
 
It's possible if your selecting a unit with four spells, each having a different hotkey (WASD).

Though you cannot detect holding, releasing of the keys. Only pressing. It works by checking if a unit casts an ability, and if the ability is one with one of those hotkeys then the key was pressed.

I made a spacebar detection script, though it only works offline (desyncs multiplayer).
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
It's possible if your selecting a unit with four spells, each having a different hotkey (WASD).

Though you cannot detect holding, releasing of the keys. Only pressing. It works by checking if a unit casts an ability, and if the ability is one with one of those hotkeys then the key was pressed.

I made a spacebar detection script, though it only works offline (desyncs multiplayer).

Hmmm then I'll stick with the arrow movement and I'll use that idea for attacking/jumping etc... (even though space and shift could be a problem...)

Can I maybe see that script?
ow gtg to bed see u guys tomorrow...

EDIT: I think the pirate tag is protected ;(
 
Status
Not open for further replies.
Top