Not attack Allies

Coolio

New Member
Reaction score
7
Hello
I created a trigger to not attack allies in my map. The trigger is -->
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 1 (Red)
(Owner of (Attacking unit)) Equal to Player 2 (Blue)
(Owner of (Attacking unit)) Equal to Player 3 (Teal)
(Owner of (Attacking unit)) Equal to Player 4 (Purple)
(Owner of (Attacked unit)) Equal to Player 1 (Red)
(Owner of (Attacked unit)) Equal to Player 2 (Blue)
(Owner of (Attacked unit)) Equal to Player 3 (Teal)
(Owner of (Attacked unit)) Equal to Player 4 (Purple)
(Owner of (Attacked unit)) Equal to Player 12 (Brown)
(Owner of (Attacked unit)) Equal to Neutral Passive
Actions
Unit - Order (Attacking unit) to Stop
It doesn't work, i tried to put every condition in "Or - Any (Conditions) are true" but no1 couldn't attack eachother..

Can someone help me with this trigger?

Thanks and sorry for my English..
 

San-D

New Member
Reaction score
15
I think the problem is the conditios- ur asking the computer to stop a unit that belongs to all 12 players at once. Thats impossible. I suggest making 12 events or something, maybe use a loop, to see which player is attacking...
 
Reaction score
65
Currently it orders the attacker to stop only if it's owned by EVERY one of those players. Put them inside an "Or" list, similiar to the If-Then-Else list.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Here is one that might help you

Code:
BaseTeam Guard
    Events
        Unit - A unit Is attacked
    Conditions
        ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
    Actions
        Unit - Order (Attacking unit) to Stop
 

Coolio

New Member
Reaction score
7
Here is one that might help you

Code:
BaseTeam Guard
    Events
        Unit - A unit Is attacked
    Conditions
        ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
    Actions
        Unit - Order (Attacking unit) to Stop

so simple and so hard =)

thanks alot!!
 
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