Picking units and killing them won't work?

nabbig2

New Member
Reaction score
43
I have this trigger when a research is complete.

Code:
Dryad Part 1
    Events
        Unit - A unit Finishes research
    Conditions
        (Owner of (Researching unit)) Equal to Player 1 (Red)
        (Current research level of Dryad Adept Training  for Player 1 (Red)) Equal to 1
        (Researched tech-type) Equal to Dryad Adept Training 
    Actions
        Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 006 <gen>) facing Default building facing degrees
        Unit Group - Pick every unit in (Units in (Entire map) matching (((Unit-type of (Picked unit)) Equal to Dryad 2) and ((Owner of (Picked unit)) Equal to Player 1 (Red)))) and do (Actions)
            Loop - Actions
                Unit - Kill (Picked unit)

Now, I made the footmen just for testing, and it creates the footmen. But why does it not kill all of my Dryad 2's? I am sure it is a Dryad 2, placed on my map, and for some reason it is not killing it. Any help will be appreciated.
 

ArmyOfFrogs

New Member
Reaction score
20
Change it from (((Unit-type of (Picked unit)) Equal to Dryad 2)
to
(((Unit-type of (Matching unit)) Equal to Dryad 2)

Picked unit won't work since you haven't picked anything yet.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Code:
Unit Group - Pick every unit in (Units in (Entire map) matching (((Unit-type of ([COLOR="Red"]Picked unit[/COLOR])) Equal to Dryad 2) and ((Owner of ([COLOR="Red"]Picked unit[/COLOR])) Equal to Player 1 (Red)))) and do (Actions)

Those red parts should be (Matching unit) :D
 
General chit-chat
Help Users

      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