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

[General] IssueImmediateOrder

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hello.

A simple question. Is it possible to give an order to unit to cast a specific spell? For example, I have many channel type of spells with one unit and if I do the following code line things can get really messy:

Custom script: call IssueImmediateOrder(GetAttacker() , "channel")"

So can I just make a unit to cast a specific channel? Is there such a code line and what is it? Thank you.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Like always, when ordering a unit to cast spell via triggers, we have to refer to its ID, right ?

Lucky for Channel-based ability, its ID can be changed to whatever you want (as long you are using the right for abilities)

What I meant by right ID ?

OrderString: thunderbolt

Above is the Spell ID for Storm Bolt, well, Storm Bolt is practically a Target-unit type spell, is it ?

Well, for your channel, you should change according to your custom spell target type

If your spell, let's say, summons a Lava at target location, you can't use thunderbolt as order string because that string is for Target-unit type, whereas what you need is Target-point based order string, which in this case, you can replace thunderbolt to healingward (Healing Ward-based ability basically a Point-target spell type)

So, edit your Channel Spell ID, today !

Ah, and to order it via triggers, it must follow its order string

If you base your Channel Order ID to thunderbolt, and if you want to order it via trigger, you have to do this;
  • Unit - Order (Triggering unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
It will cast any of your currently available Channel spell which is based on Storm Bolt order string.

And if you base your Channel to chainlightning... you know what to order it via triggers right :)
 
Status
Not open for further replies.
Top