How to not let player 1 attack player 2 UNLESS event happens.

Noritox

New Member
Reaction score
0
Okay, I'm trying to prevent team killing on a map I'm making. What I want to do is not let player 1 (red) attack player 2 (blue) UNLESS the unit red wants to attack has less than 75% of its health.

I know it's possible, spent hours looking for the right triggers with no luck. I'm out of ideas. Anyone have any suggestions?
 

Lyle.

New Member
Reaction score
32
Okay, I'm trying to prevent team killing on a map I'm making. What I want to do is not let player 1 (red) attack player 2 (blue) UNLESS the unit red wants to attack has less than 75% of its health.

I know it's possible, spent hours looking for the right triggers with no luck. I'm out of ideas. Anyone have any suggestions?

This is the team kill trigger I use. Leaves open the chance to Deny.

Trigger:
  • Team Kill
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an ally of (Owner of (Attacked unit))) Equal to True
      • (Percentage life of (Attacked unit)) Greater than 20.00
    • Actions
      • Unit - Order (Attacking unit) to Stop


That 20 represents a 20% chance, you would want to change it to a 25.
 

cleeezzz

The Undead Ranger.
Reaction score
268
Code:
Untitled Trigger 002
    Events
        Unit - A unit Is attacked
    Conditions
        ((Owner of (Triggering unit)) is an ally of (Owner of (Attacking unit))) Equal to True
        (Percentage life of (Triggering unit)) Greater than 75.00
    Actions
        Unit - Order (Attacking unit) to Stop

edit: man im slow today
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Shouldn't it be Less than?

EDIT: Sorry, I don't even know why I asked that. Dumb question
 
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