• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Changing Ability Hotkey

Status
Not open for further replies.
Level 5
Joined
Jul 18, 2010
Messages
159
Hey, I'm making a map in which the player will choose what spells he/she wants to use from over 20 different spells per class. That said, I don't think I'll be able to assign unique hotkey for every spell in the game, and even if I did it wouldn't be comfortable to play with.
I just wondered if it's somehow possible to change the hotkey of a skill with GUI/JASS, so when player chooses to use set of 4 spells, the spells will always align to QWER/ZXCV or something like that.

I have an idea that I think will work but that would be more complex than I would like it to be
My way would be:
1. Create spells based on chanel that would have Q, W, E, R assigned as their hotkeys.
2. When player choses what spell he wants to use: Use triggers to change icon, tooltip, cooldown and so on of the for example QSpell to desired values
3. Set a Variable for example "Fireball" = QSpell

First of all do you think there is an easier way?
Second - do you think the way presented above will work if nothing else will?
Thanks in advance, and sorry if I'm not seeing something obvious somewhere in the editor.
 
Level 20
Joined
Aug 29, 2012
Messages
826
There doesn't seem to be any action in GUI to change hotkey.

What you suggest would probably work to an extent, but you won't be able to change things like range, mana cost or even turn an instant spell into a targeted one via trigger, so you might run into limitations.

Honestly I don't see any easy solution for this. The most simple would be to create 4 versions of all of your abilities with different hotkeys each, which isn't optimal at all.

Else, you might want to assign specific types of spells only to specific hotkeys (e.g. Q would be a single target, W an AoE, etc.) but it would limit choices.
 
Level 7
Joined
Oct 3, 2008
Messages
183
Iirc the patch notes did say something about a native for changing hotkeys being added.

Code:
native SetAbilityPosX: takes integer abilCode, integer x returns nothing
native SetAbilityPosY: takes integer abilCode, integer y returns nothing
 
Level 5
Joined
Jul 18, 2010
Messages
159
There doesn't seem to be any action in GUI to change hotkey.

What you suggest would probably work to an extent, but you won't be able to change things like range, mana cost or even turn an instant spell into a targeted one via trigger, so you might run into limitations.

Honestly I don't see any easy solution for this. The most simple would be to create 4 versions of all of your abilities with different hotkeys each, which isn't optimal at all.

Else, you might want to assign specific types of spells only to specific hotkeys (e.g. Q would be a single target, W an AoE, etc.) but it would limit choices.

My idea would work for me cause all of my spells are triggered anyway and every object editor value for them is the same, all based of chanel ability. So range and so on is not a problem in my case.
Guess I'll do it like that then if I won't find official notes stating that hotkey change will be added.
Btw. Mana cost can be changed with GUI
 
Status
Not open for further replies.
Top