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

[JASS] A player presses key(NOT ARROWS!)

Status
Not open for further replies.
Level 1
Joined
May 15, 2007
Messages
88
I just wonder what the event for another key than the arrow key is, and if so, can I use the preset GUI triggers(WE or WEU) or do I have to use JASS scriting, if I have to, could anyone who knows JASS pretty well, tell me the event (But then again, I don't know how to create the action in JASS.

Thanks.
 
Level 2
Joined
Oct 26, 2004
Messages
12
I have tried to find out if that is possible too, if you mean to detect if forinstance the A key is either pressed or released. With abilities you will just get one of them.

Since the arrow-keys are primarily used for moving the camera, I thought it would be possible to bind other keys to that function (CustomKeys.txt).

Right now I've kinda given up the (re)search, just keeping an eye open ;)
 
Last edited:
Level 7
Joined
Jun 10, 2007
Messages
225
You cant register when a player hits something other than the arrow keys.
What you can do is an even easier-Give the unit a spellbook, with some spells in it, and disable the spellbook for the player. his allows you to use the hotkeys for the spells, but you cant see their icon. Give each spell no effects, casting time, etc, and there you go. Then, use A unit is issued an order, if order = that spells order string, make the unit do X actions.
 
You cant register when a player hits something other than the arrow keys.
What you can do is an even easier-Give the unit a spellbook, with some spells in it, and disable the spellbook for the player. his allows you to use the hotkeys for the spells, but you cant see their icon. Give each spell no effects, casting time, etc, and there you go. Then, use A unit is issued an order, if order = that spells order string, make the unit do X actions.

Nope, that won't work.

Since the spellbook isn't actually open, you can't access the spells. It's like reading a book without it open or eating muffins when the oven is closed with them inside or something. You don't, (in this case), have access to the spell.

For proof, read Diablo-dk's spellbook tutorial; I asked somewhere if the disabled spellbook trick is accessable and if it works, but I believe he and PurplePoot said that it isn't accessable and won't work.

Just in case, I even tested it doing everything right but it still didn't work. :wink:
 
Level 25
Joined
May 11, 2007
Messages
4,650
Nope, that won't work.

Since the spellbook isn't actually open, you can't access the spells. It's like reading a book without it open or eating muffins when the oven is closed with them inside or something. You don't, (in this case), have access to the spell.

For proof, read Diablo-dk's spellbook tutorial; I asked somewhere if the disabled spellbook trick is accessable and if it works, but I believe he and PurplePoot said that it isn't accessable and won't work.

Just in case, I even tested it doing everything right but it still didn't work. :wink:

How about making the ''dummy'' unit have no attack at all, and no movement at all?

And then just add the abilitys and have another unit do the things when you Press them.
 
Status
Not open for further replies.
Top