Friendly Fire

NullCurrent

( ゚ε ゚)
Reaction score
110
How would you go about creating a friendly fire trigger. So when a unit attacks a friendly, the unit does not take any damage.
 

Hero

─║╣ero─
Reaction score
250
You would need to use the event a unit is attacked.

Since it is fired before the unit receives any damage you can order the unit that is attacking to immediately stop. Therefore no damage is done.
 

Exide

I am amazingly focused right now!
Reaction score
448
You can stop the unit from attacking them, very easily:

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

Hero

─║╣ero─
Reaction score
250
You can stop the unit from attacking them, very easily:

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

That is exactly what I meant.
 

Exide

I am amazingly focused right now!
Reaction score
448

NullCurrent

( ゚ε ゚)
Reaction score
110
Ahh ha! Finally, thank you, I knew there was something like that, I jsut couldnt find it. Thank you. +Rep to both of you
 
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