Trigger not working

T

Tommeh

Guest
Code:
Trigger
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
        (Issued order) Equal to (Order(attack))
        ((Target unit of issued order) belongs to an ally of (Owner of (Ordered unit))) Equal to True
        (Percentage life of (Target unit of issued order)) Greater than 13.50
    Actions
        Unit - Order (Ordered unit) to Stop

Why doesn't this work? It's meant to prevent team killing of allies over 13.5% HP but it doesn't.

Pre-emptive strike on the people about to say "try triggerin unit instead of ordered unit". Doesn't help :p
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Maybe its because its order to attack. U have to press a to attack and also, 13.50 means 13.50 hp not 13.50%
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
But taking damage or attacking(already) does damage to the ally, meaning, if the ally keeps clicking, thn it will hit once, then click, hit once. And so on. So it wont work.
 

darkbeer

Beer is Good!
Reaction score
84
Code:
Trigger
    Events
        Unit - A unit Is issued an order targeting an object
    Conditions
        (Issued order) Equal to (Order(attack))
        ((Target unit of issued order) belongs to an ally of (Owner of (Ordered unit))) Equal to True
        (Life of (Target unit of issued order)) Greater than (Max Life of (Target unit of issued order)  * 0.135)
    Actions
        Unit - Order (Ordered unit) to Stop

there are some problems with the percentage^^ (atleast i didnt get things to work i used it last time)
 
T

Tommeh

Guest
Maybe its because its order to attack. U have to press a to attack and also, 13.50 means 13.50 hp not 13.50%

Except it says "percentage life"..

Thanks AceHart, I thought that would trigger after the attack had been made.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
sorry, my bad, didnt see percentag over there. Acehart's work, but itll still allow the unit to damage the ally once. So it can keep damaging, stop, damaging, stop until aly is dead. Follow darkbeer's trigger. It shld work
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Yeah.. Maybe it will work... Because its attacking and not sensing damage. So i shldn't jump into conclusion. U shld try it, although I believ darkbeer's is better.
 
T

Tommeh

Guest
Or at the very least reading my post above which I think kind of hints towards what you'd find if you were to make such an experiment.
 

Hazanko

New Member
Reaction score
2
Ace Heart's method works the best, its a tiny little trigger that only needs to be used once

Trigger:
  • Events
    • Unit - A unit is issued an order targeting an Object
    • conditions
    • (Triggering unit) belongs to an ally of (Owner of (Target unit of issued order))) Equal to true
    • Actions
    • Unit - Order (Triggering unit) to Follow (Target unit of issued order)


This is what I used, it makes attack orders on allys turn into follow orders.
You can easily add the life condition and replace follow with stop if you like
 
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