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

[Solved] What is the Illusion order

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
1. Search for the Wand of Illusion ABILITY (The one the Item has in the Ability data field, I think it's "Illusion (Item)")
2. Press CTRL + D (This enables seeing Raw Codes)
3. Write down the Illusion Ability RawCode
4. Create the trigger with any order
5. Backup the trigger (Create a Copy)
6. Select one of the triggers and go to Edit -> Convert to custom text
7. Search there for something like "UnitIssueOrderByID" or something like that. That's the Custom code of the action you want to do.
8. The action uses arguments: UnitIssueOrderById(TargetUnit, OrderString) or something like that.
9. Replace the order string of your action with the Raw code of the illusion this way: 'A0H2' with the '''''s

<< EDIT >>


Instant Cast Orders (like Stop)
By string native IssueImmediateOrder takes unit whichUnit, string order returns boolean
By Id native IssueImmediateOrderById takes unit whichUnit, integer order returns boolean

Point Orders (Like Move)
By string native IssueInstantPointOrder takes unit whichUnit, string order, real x, real y, widget instantTargetWidget returns boolean
By Id native IssueInstantPointOrderById takes unit whichUnit, integer order, real x, real y, widget instantTargetWidget returns boolean

Target Orders (Like Illusion)
By string native IssueTargetOrder takes unit whichUnit, string order, widget targetWidget returns boolean
By Id native IssueTargetOrderById takes unit whichUnit, integer order, widget targetWidget returns boolean

<< EDIT >>

This is the action to cast Item Illusions ('Alil')
  • Custom script: call IssueTargetOrderById(GetTriggerUnit(), 'Alil', GetSpellTargetUnit())
call IssueTargetOrderById(GetTriggerUnit(), 'Alil', GetSpellTargetUnit())

'Alil' is interpreted by the game as an integer.

You can use this whenever you want to know the Id of any order.
JASS:
call BJDebugMsg(OrderId2String(GetIssuedOrderId())) // This tells you the string
call BJDebugMsg(I2S(GetIssuedOrderId())) // This tells you the number
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
It's call IssueTargetOrderById(YourDummy, 852274, YourTarget)
If you use 'AIil', you never know if that ability is custom-made, it would perhaps become 'A000' and it's a hard guess.
Better to use its own order string, be it either 'A000' or even 'A00B', the order string remains the same.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
As I said, it's generic, many guesses would have been thrown if you use an item as reference.

You see, what if the item is not from Wand of Illusion ?

Maybe the item is custom-made ?

That's why I said, it's easier to just use its Order String which is '852274'.

Also, if you're gonna do that, each time the unit is spawned, you need to create that item and order the unit to use the item, that's more work.

It's more easy if the ability is pre-added (Object Editor) and when you create the unit, you just need to use the custom script and the unit will cast the ability. (don't need to create item for unit, don't need to add "Inventory Ability" on normal dummy unit)
 

sentrywiz

S

sentrywiz

nafre's suggestion is by far the easiest way to use item abilities without needing to bother alot. I concur on the suggestion
 

sentrywiz

S

sentrywiz

Actually that is exactly what that means.
Simple solutions are by far most efficient.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Extra call: Creates item.

Item is a handle, which if you dynamically create it (just like Units), they would be compiled in that map.

Now, if you use the order, the ability is added via Object Editor and you don't need any handle to deal with, which you can safely clear the dummy as simple as that.
 

sentrywiz

S

sentrywiz

"I want to make a dummy unit cast illusion (the item ability of staff of illusions) but I cant find the order in the triggers."

The post of this thread is to give the user a simple follow method to cast illusion of an item. We do not question or really need to know if he has a custom item (which btw, still works, matters not if its custom item or the default item) or if he/she creates the item dynamically or buys it from a shop and then uses it.

Any additional questions from the same user will spark more conversation ground. But only then, not before. So while you do have the logic to suggest a full-blown efficient method, in this case it falls in last place. The user doesn't need or care, he/she just wants a way to cast illusion off an item. That's it
 
Status
Not open for further replies.
Top