• 🏆 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!

Custom Orders

Status
Not open for further replies.
Level 5
Joined
Sep 27, 2011
Messages
141
how can you order a unit to cast a custom spell that is not based off any of the ones on the order units to actions lists i need this for an ability based off scroll of protection so if there is anything specific for this spell please let me know. thanks.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
It is usually an item ability, like this one

JASS:
call IssueTargetOrderById(udg_Dummy, 852274, udg_Caster)

That is to order a unit use that ability of Wand of Illusion-based ability
The '852274' is the Item Ability Code to order it via trigger

I'm sure there are lists of the item code somewhere around Google
 
Level 5
Joined
Sep 27, 2011
Messages
141
thanks to both of you i tried using this to get the spells id but it only came up with 0 every time so call BJDebugMsg(I2S(GetIssuedOrderId()))

so i used this instead
call BJDebugMsg(I2S(GetSpellAbilityId()))

then that gave me this for the spell Id 1093677135
so i used this to try cast it but it didnt work
call IssueImmediateOrderById( GetLastCreatedUnit(), 1093677135 )

can someone please help me
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
call BJDebugMsg(I2S(GetSpellAbilityId()))
Use this call BJDebugMsg(I2S(GetIssuedOrderId())) to catch the Order ID of an ability (not Ability ID) instead of GetSpellAbilityId (because if you do so, you will have its ABILITY ID whereas you want the ORDER to execute the ability)

call IssueImmediateOrderById( GetLastCreatedUnit(), 1093677135 )
It's supposed ti be call IssueTargetOrderById(dummy, OrderID, target) instead of IssueImmediateOrderById
 
Status
Not open for further replies.
Top