Kill a unit that hasn't spawned yet?

excis

Member
Reaction score
1
Hi, Can how do you kill lets say 2 footmen spawns and they are supposed when X dies do you need to use variables for this?
 

excis

Member
Reaction score
1
I mean for example every 10 seconds 2 footmen will spawn and i know you can kill one of them by the kill last created unit but if the boss dies i need all of them to die how do you do that?
 

HellCraft

Member
Reaction score
19
Use the event - Specific unit event. For the unit, click select a unit and select your boss(considering your boss is already placed on the map and not created by triggers). For the event, use 'dies'.
In the actions, select Unit Group - Pick every unit in unit group and do action. The unit group will be all units in playable map area matching (unit type of matching unit is footman). And use Kill Picked Unit as the action.
Then add another action which disables your trigger which spawns the footmen.
You should end up something like this:
Trigger:
  • Events
    • Unit - Boss dies
    • Conditions
      • None
    • Actions
      • Unit Group - Pick every unit in (Units in (playable map area) matching (unit-type of matching unit is footman)) and do Kill (Picked Unit)
      • Trigger - Disable FootmanSpawn trigger
 

Dirac

22710180
Reaction score
147
Create 1 footman
Kill it
Create another footman
kill it again

You can use a loop to kill more people
 

excis

Member
Reaction score
1
Use the event - Specific unit event. For the unit, click select a unit and select your boss(considering your boss is already placed on the map and not created by triggers). For the event, use 'dies'.
In the actions, select Unit Group - Pick every unit in unit group and do action. The unit group will be all units in playable map area matching (unit type of matching unit is footman). And use Kill Picked Unit as the action.
Then add another action which disables your trigger which spawns the footmen.
You should end up something like this:
Trigger:
  • Events
    • Unit - Boss dies
    • Conditions
      • None
    • Actions
      • Unit Group - Pick every unit in (Units in (playable map area) matching (unit-type of matching unit is footman)) and do Kill (Picked Unit)
      • Trigger - Disable FootmanSpawn trigger
Is there a reason a unit which has locust cant be killed by this trigger? Because first i tested with locust it didnt die, then i tested without and then it work as intended :S
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yes, locusted units can't be picked with that group actions...
It can only be picked if you use "Unit Of Type" or "Unit Of Player"...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top