Is there a way for me to bind a key that will allow multiple units in my control group to all use the same spell at once?
For example, if I have 3 centaurs as chen, and I have them all selected. Can I press one key to make them all warstomp at the same time?
Or if I have 3 familiars as Visage. When I have all three selected, is there a button I can press to have them all stun at the same time?
Best Answer
I built a few variants of your desired script:
Preamble:
I did this because it is more readable for me. If you don't want to use that alias you need to change
Qdefault
below todota_ability_execute 0
!Hero + 3 units in 1 group:
Assumes that you selected your hero + units (in this case 3x familiars) and switches to the first, casts a spell and switches to the next until it reaches to the hero again.
Unit selected
Like the first but starts at the first familiar
Only units
Group of units only
Manually
This script switches to the next unit and uses a spell. This enables you to time your stuns (chainstun) the enemy.
Final binding
You need to bind any of those aliases (you can have them all in your exec file, aliases wont be executed if not used/binded!)
Afterword:
Those scripts (execpt "manually") assume that the group consist of 3 units. I did not find a way to count the units of a group. Otherwise i may be able to adjust that script a bit.
Extra:
Additionally i wrote a script that lets you cycle through a script from above (in this case heroAndUnits1-4) depending on your unitcount! Feel free to ask me about it since this is pretty advanced.
Pressing N in this case cycles through heroAndUnits1-4 and then back to 1. Each cycle rebinds "B" (you can change this if you want) to execute the groupspell.
To realize which number is currently active as a user i added a
say_team
which is a normal ingame-chat to your teammates.