HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dynamically set ability hotkeys

05-07-2005, 07:39 PM#1
TitanLectro
I'm working on a map where the heros can have almost any combination of about 100 abilities at any given time. Needless to say, it is impossible to map out hotkey for all of them, so I was trying to come up with a way to dynamically set the hotkey assignments. One idea I had was to setup hidden dummy spells with the hotkeys Q, W, E and R, and then trigger it so that when one of them is clicked, it automatically clicks on another spell. But it seems as though there is no function to do this. Is there a function that can force a unit to click on an ability icon? Also, is there any other way to change/set the ability hotkeys in game?
05-07-2005, 08:49 PM#2
Taur
there is a function to force a unit to cast a spell, same thing right?
05-07-2005, 10:34 PM#3
TitanLectro
Not exactly, I'm looking for a function that only clicks on the icon, so that the player can then use the spell to select a target point or unit. Also, I'm not sure if there is a a way to force a unit to cast "channel" based spells.
05-07-2005, 10:35 PM#4
Ceo
I'm not sure if there is a better way, but this is how I would go about it.


Think about all the different types of spells there are. For example (you might have more):
-Point blank area of effect
-Ranged area of effect
-Single targetted unit

Now, if you have a max of 5 abilities per hero you would make 15 dummy abilities, one for each slot of each type of spell. Each slot would always have the same hotkey across types of abilities and heroes. Then you'd have an array of spells for each hero that would fire when you use the dummy hotkeys.


There are some problems with this though, one being the fact that ranged abilities have different ranges. You would have to check if the spell's is within it's maximum range in the trigger then. I'm sure you would hit other walls on the way as well, one being how to relate the abilities on the hero to the hero's array.