A unit netrual untill it get's attacked?

C-Death

I love you
Reaction score
45
Hey, i was wondering if it is possible to make a unit (like a creep) netural untill you attack it. Thanks.
 

Ashcat

Hellooo
Reaction score
68
Code:
Attack Swap
    Events
        Unit - A unit Is attacked
    Conditions
        (Owner of (Attacked unit)) Equal to Neutral Hostile
    Actions
        Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
 

Onnings

New Member
Reaction score
9
The trigger above me seems to change a neutral hostile-unit to the side of the player attacking. If you want a neutral to change into hostile when attacked, you should originally place / spawn the unit to Neutral Passive, then do this:
Code:
Attack Swap
    Events
        Unit - A unit Is attacked
    Conditions
        (Owner of (Attacked unit)) Equal to Neutral Passive
    Actions
        Unit - Change ownership of (Attacked unit) to Neutral Hostile and Change color
 

C-Death

I love you
Reaction score
45
The trigger above me seems to change a neutral hostile-unit to the side of the player attacking. If you want a neutral to change into hostile when attacked, you should originally place / spawn the unit to Neutral Passive, then do this:
Code:
Attack Swap
    Events
        Unit - A unit Is attacked
    Conditions
        (Owner of (Attacked unit)) Equal to Neutral Passive
    Actions
        Unit - Change ownership of (Attacked unit) to Neutral Hostile and Change color

woot you get a rep!
 
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