I want to make a trigger that lets queens automatically transfuse a target if it gets to low hp. It should only be able to target friendly units, not hostile. Also, if it is possible, I want it to only target biological units. I have created a trigger, but it doesn't seem to work. Here it is:
-
Queen (Heal)
-
Events
- Unit - Any Unit Life changes
- Local Variables
-
Conditions
-
And
-
Conditions
- ((Triggering unit) Life (Current)) >= (((Triggering unit) Maximum Life (Current)) / 5.0)
- ((Unit type of (Triggering unit)) has Biological attribute) == True
- (Owner of (Triggering unit)) == 1
-
Conditions
-
And
-
Actions
-
Unit Group - Pick each unit in ((Unit type of (Closest unit to (Position of (Triggering unit)) in (Unit group((Triggering unit))))) units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most 1) and do (Actions)
-
Actions
- Unit - Order (Picked unit) to (Queen - Queen - Transfusion targeting (Triggering unit)) (Before Existing Orders)
-
Actions
-
Unit Group - Pick each unit in ((Unit type of (Closest unit to (Position of (Triggering unit)) in (Unit group((Triggering unit))))) units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most 1) and do (Actions)
-
Events