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

Issue Order to Use an Ability from a Spellbook

Status
Not open for further replies.
Level 4
Joined
Oct 19, 2010
Messages
71
Hi there. Thanks for reading. I'm trying to issue an order to a hero to use an ability in its spellbook. Is that possible? Just issuing an order to use the ability itself isn't working. I realize I could do this in other ways, but I'm trying to simulate multiple players giving the same orders to test my map. Thanks for any help.
 
Level 4
Joined
Oct 19, 2010
Messages
71
I'll have to give those abilities hotkeys, but that will do what I'm looking for. Thank you. I did find an action called Game - Force UI Key. I guess that is what I'd use.

Just out of curiosity then, if anyone knows a way to do it by issuing an order to a unit, I'm still interested in finding out. However, I will use your solution Maker. Thanks again!

It won't let me add to your reputation. You must have helped me before. :)
 
Level 4
Joined
Oct 19, 2010
Messages
71
It doesn't seem to be working. Purple and Yellow are computer players, and I put this:


  • Selection - Select Young Man 0608 <gen> for Player 4 (Purple)
  • Game - Force Player 4 (Purple) to press the key E
  • Game - Force Player 4 (Purple) to press the key A
  • Selection - Select Young Man 0607 <gen> for Player 5 (Yellow)
  • Game - Force Player 5 (Yellow) to press the key E
  • Game - Force Player 5 (Yellow) to press the key A
It doesn't seem to do anything. Am I doing something wrong? I gave red advanced shared unit control over them and those hotkeys work.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
As WK said it,
  • Set Unit = (Triggering unit)
  • Custom script: call IssueImmediateOrder(udg_Unit,"thunderclap")
This will make Triggering unit (responds to any Event you want, perhaps "A unit is attacked" Event ?) to cast Thunder Clap-based ability (if he has one)
If he doesn't, this trigger does nothing
You can also make it cast other ability, you just have to change the "thunderclap" to another base order string
 
Status
Not open for further replies.
Top