Trigger Help

lordrd

New Member
Reaction score
2
Code:
Marine
    Events
        Unit - A unit enters Marine <gen>
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Owner of (Triggering unit)) Equal to Player 1 (Red)
                (Owner of (Triggering unit)) Equal to Player 2 (Blue)
                (Owner of (Triggering unit)) Equal to Player 3 (Teal)
                (Owner of (Triggering unit)) Equal to Player 4 (Purple)
                (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in Marine <gen>)) Equal to 2
            Then - Actions
                Unit - Create 1 Marine for (Owner of (Triggering unit)) at (Random point in Taverna <gen>) facing Default building facing degrees
            Else - Actions

Trigger works fine but i need a action to kill
triggering units "(Number of units in (Units in Marine <gen>)) Equal to 2"

i found this, but it only kill 1 unit
"Unit - Kill (Triggering unit)"

thx LordRD
 

lordrd

New Member
Reaction score
2
i try this "Unit Group - Pick every unit in (Units in Marine <gen> owned by (Owner of (Triggering unit))) and do (Unit - Remove (Triggering unit) from the game)"

but dont work... only kill the first triggering unit...
 

Exide

I am amazingly focused right now!
Reaction score
448
Because when you use unit group - pick every unit in -Condition-, you need to use (Picked Unit) in order to get them.

Unit Group - Pick every unit in '(Units in Marine <gen> owned by (Owner of (Triggering unit))) and do (Unit - Remove (Picked unit) from the game)'

If you only want to remove the unit that enters, you could use:
Unit - Remove (Triggering unit), though.
 
General chit-chat
Help Users

      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