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

Order unit to cast custom spell

Status
Not open for further replies.
Level 2
Joined
Jan 1, 2020
Messages
8
I am trying to order a unit to cast a spell based on item town portal on a building. Through GUI I tried "order 'unit' to 'human - mass teleport' to 'unit' " and it didn't work. Next I converted the trigger to JASS and edited the spell.

call IssueTargetOrderBJ( gg_unit_Hblm_0183, "A002", gg_unit_h000_0054 )

A002 is the id of the custom spell. Still, nothing. Any help?
 
Level 21
Joined
Apr 12, 2018
Messages
494
Custom abilities always use the 'order' ID of the base spell you based it off of.


call IssueTargetOrderBJ( gg_unit_Hblm_0183, "A002", gg_unit_h000_0054 )

In this case entering the ability code effectively tells the unit to Do Nothing since what you supplied was not a valid 'order' ID. Issue Order actions do not accept ability codes as valid input.

Most abilities' order IDs are documented in the editor, but abilities based off of Items are usually not (I would suggest trying what the previous poster suggested and if it doesn't work you're going to have to figure it out the hard way)
 
Level 24
Joined
Jun 26, 2020
Messages
1,928
Following what they said, you should look here:
1623629336891.png
 
Status
Not open for further replies.
Top