how to assign a building cast a spell when a unit is being attacked?

charzhai

New Member
Reaction score
2
event - player(brown) is being attacked

contidion
trigger unit equal to building abc

action
<how to assign a building to cast a spell to the trigger unit?>
 
Reaction score
456
Code:
Order Cast
    Events
        Unit - A unit owned by Player 12 (Brown) Is attacked
    Conditions
        ((Attacked unit) is A structure) Equal to True
    Actions
        Unit - Order (Attacked unit) to <Your Order> (Attacking unit)

That should do it, I think.
 

RedOrb

You can change this now in User CP.
Reaction score
14
Code:
Order Cast
    Events
        Unit - A unit owned by Player 12 (Brown) Is attacked
    Conditions
        ((Attacked unit) is A structure) Equal to True
    Actions
        Unit - Order (Attacked unit) to <Your Order> (Attacking unit)

That should do it, I think.

Yeh, except where the attack order is in place, you could replace for a spell:

Code:
Unit - Order Building1 to Human Blood Mage - Banish (Attacking unit)

Where the spell is the ID of the spell you want cast.
 
Reaction score
456
>Yeh, except where the attack order is in place, you could replace for a spell
What do you mean..? <Your Order> means that put your order there.. It doesn't mean attack?
 
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