• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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,651
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