Question about unit orders for a spell!

Mittsies

New Member
Reaction score
24
How do I do something like this:

EVENT:
Unit Casts Ability

CONDITION:
Target Unit of Ability is unit-type "SPELL DEFLECTOR"

ACTION:
Add (Casted Ability) to (Target Unit of Ability)
Order (Target Unit of Ability) to (string(order of ability cast)) (Casting Unit)

The red part is what I'm having trouble with.

EDIT: I probably need to use a custom script. How do I get the order of ability cast into:
call IssueTargetOrder( GetPickedUnit(), "order of ability cast", GetTriggerUnit() )
 

Squirel

New Member
Reaction score
13
If you have custom spells (which I assume you do), then you have a problem because casting a custom spell requires an order string from the base ability. For instance if I make a spell that summons a rabbit, and base it off of water elemental, I have to order that unit to cast "Human Archmage - Water Elemental" because that is what the spell is based off of. I don't think that it is possible to do that with GUI, maybe there is a JASS command. You might try redoing this spell and basing it off "Magic Defend" (human spell). I think you can cause that to deflect spells in the object editor.
 

Mittsies

New Member
Reaction score
24
I really don't understand what the spell does. Can you add more info on the spell?
You don't need to understand what the spell does, I just need to know how to get an spell's base ability into a string.

If you have custom spells (which I assume you do), then you have a problem because casting a custom spell requires an order string from the base ability.
Uh yes, that's the idea. That's why I need to know how to do this.

EDIT: Figured it out on my own.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top