• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 20
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,852
Following what they said, you should look here:
1623629336891.png
 
Status
Not open for further replies.
Top