kill someone close to ball

mariopoop

New Member
Reaction score
1
how do you make the variable in "kill someone in X range" any unit that is a ball (pretend ball is a unit, like a footmen, a ball.)
 

Shura

New Member
Reaction score
45
Make a trigger to periodically pick every ball, and then kill all the units within a certain range of them.
 

Shura

New Member
Reaction score
45
Trigger:
  • trigger
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Your Unit)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Picked unit))) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)

This leaks.
 

Shura

New Member
Reaction score
45
Trigger:
  • trigger
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Your Unit)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Not equal to Your Unit)) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
 

Zanderist

New Member
Reaction score
5
Trigger:
  • trigger
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Your Unit)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Picked unit))) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)

This leaks.

How would you fix that leak then? Custom Script?
 

Shura

New Member
Reaction score
45
Yes, you would need to set both unit groups and the point into variables, and use custom script to remove them when you're done.
 

Zanderist

New Member
Reaction score
5
Well I've done something like that, and it tells me that it's invalid.

I posted a thread on it.
 

DuelPlayer

Member
Reaction score
21
Trigger:
  • SetRemove
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to ball
    • Actions
      • Trigger - Add to Remove <gen> the event (Unit - A unit comes within 200.00 of (Entering unit))


Trigger:
  • Remove
    • Events
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to runners
    • Actions
      • Unit - Kill (Triggering unit)


Leakless and works i guess...
 

SwedishChef

New Member
Reaction score
32
Well still better to have that condition if it dies since you don't know if it don't. Even if a unit dies it stays in the map and units around the place where the ball died will still die.

But yeah you only need it if the ball can die.
 

DuelPlayer

Member
Reaction score
21
Well still better to have that condition if it dies since you don't know if it don't. Even if a unit dies it stays in the map and units around the place where the ball died will still die.

But yeah you only need it if the ball can die.

Tell the person who asked this question =.= not me :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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