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

===Wand Of Illusion (Item Illusion)===

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Well, I want to create a triggered illusion ability
Where X% chance of the time, the unit will create the illusion of itself
Better understanding for people who plays DotA: This spell is like Phantom Lancer's Juxtapose
Okay here's the thing
I already got its base ability (Item Illusion)
But HOW do I order my dummy to USE that particular spell ?
I mean, I searched through "Unit - Issue Order Targeting A Unit" until "Unit - Issue Order With No Target" but to no avail, I didn't found this so-called "Wand of illusion" ability to be triggered with
So, I want this ability to copy (illusion the caster) for X% chance of a time
Thank you =~D
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Item abilities usually have no order string. So you have to use the ById-functions, which go by the numeric order id.

You can obtain this id via a simple trigger:

  • Events
    • Einheit - A unit Is Issued an Order targeting an Object
  • Conditions
  • Actions
    • Custom script: call BJDebugMsg(I2S(GetIssuedOrderId()))
Result is 852274 for this ability.

JASS:
call IssueTargetOrderById(<caster>, 852274, <target>)

Another possibility would be to use the ability through an item and order use by

  • Hero - Use Item On A Unit
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
For the "Hero - Use Item On A Unit" action...
We must FIRST add the ability to the unit first, before firing it, yes ?
If we use that action, the item must appear at the Inventory LOL
What will happen if my inventory is full at the moment ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Oh...
I get it...
My dummy unit MUST HAS the Inventory ability, eh ?
Then, add the item to the dummy
Trigger it from there, right ?
But my dummy is NOT a Hero
But the action says otherwise ?
"HERO - Use Item On A Unit" ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I had to use Hero as dummy-based unit
Cause' even if I add Unit Inventory to the dummy (normal unit), it still doesn't show up in UI, the 6-slot ability
So, I had to use Hero-type dummy
And Hide it =D
Thanks for the solution WaterKnight !
And you too Maker =D
 
Status
Not open for further replies.
Top