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

Make a Unit cast a Spell with Triggers

Status
Not open for further replies.
Level 5
Joined
Apr 1, 2010
Messages
107
How do I make a unit/hero cast a spell with GUI Triggers?

Issue Order targeting a Unit <- Does not work.

I don't see any triggers at all to do this..
Help?

The map is a cinematic.
 
Level 5
Joined
Apr 1, 2010
Messages
107
The list of abilities in the trigger does not include custom abilities. I need it to cast ANY ability I need it to.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
The list of abilities in the trigger does not include custom abilities. I need it to cast ANY ability I need it to.
Trigger the unit to cast the ability that you based the custom spell on, e.g.: if you based the ability off Storm Bolt, then you need to trigger the unit to cast storm bolt and it'll cast the custom one.
This is because every spell has a Spell ID: this Spell ID cannot be customized and can only be changed in the spells Channel and Spellbook.
A custom ability automatically takes the Spell ID of the ability it was based on.
If you base it off channel, then check the Spell ID you're using ^^
 
Level 5
Joined
Apr 1, 2010
Messages
107
Ok, I get it now. Thanks guys, +rep

EDIT: What if you have more than one of the same spell ID? (Making multiple custom spells after Storm Bolt), Would it only fire the spell the unit has? (What if you have both spells on the same unit?)
 
Level 18
Joined
Feb 28, 2009
Messages
1,971
What if you have more than one of the same spell ID? (Making multiple custom spells after Storm Bolt), Would it only fire the spell the unit has? (What if you have both spells on the same unit?)
It`ll cast one of these spells (you never know which one but most probably the spell with lower X/Y position). You must then base one of the spells on another ability or give it other spell ID (works only for channel!)
 
Status
Not open for further replies.
Top