Change target of an order?

ChaosWarlock

New Member
Reaction score
7
Is there a way to change the target of an order?

Example: I have 3 heroes. I tell Hero 1 to cast a spell on Hero 2 but he actually casts the spell on Hero 3.

I was thinking of using a custom script to capture the order and redirect it but I don't know any Jass :(


If anyone knows how to do this I would really appreciate it.
 

Sartan

New Member
Reaction score
23
Code:
Untitled Trigger 001
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
        (Issued order) Equal to (Order(stormbolt))
        (Target unit of issued order) Equal to (YourHero2)
    Actions
        Unit - Order (Triggering unit) to Human Mountain King - Storm Bolt (YourHero3)
something like that?
 

ChaosWarlock

New Member
Reaction score
7
I had to change a few things but that worked out great. Here is the trigger that successfully redirects any spell that is cast on that unit.

Trigger:
  • Redirect Any Spell
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Target unit of issued order) Equal to (==) P1_Allies[1]
    • Actions
      • Set Temp_Order = (Issued order)
      • Unit - Order (Ordered unit) to Temp_Order Teammate_2


Thanks for the help!
+rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top