• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Removing units in range if point is blighted

Status
Not open for further replies.
  • PlanetDeath
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Habited Planet
    • Actions
      • Environment - Remove Blight for (Owner of (Dying unit)) from (Position of (Dying unit)) to a radius of 200.00
      • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Dying unit)) matching (((Unit-type of (Matching unit)) Not equal to Habited Planet) and (((Unit-type of (Matching unit)) Not equal to Planet) and (((Matching unit) is A structure) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
When a Habited Planet dies, all units whitin 200 range must die too, but for an unknow reason it does not work !? I just cant figure it out...
NOTE: The Habited Planet is like a haunted gold mine and i'm wondering is it because when it dies its replaced whit a planet, and the daying units is removed from ingame ? The problem is that the first action works, and it uses position of daying unit...

EDIT: I made it by adding a trigger that checks every 2 seconds on every building is it close to a planet, and if not kill it. It worked that way, but i dont want to use more triggers then i need... So help is still wellcome
 
Last edited:
Level 12
Joined
Mar 23, 2008
Messages
942
  • PlanetDeath
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Habited Planet
    • Actions
      • Environment - Remove Blight for (Owner of (Dying unit)) from (Position of (Dying unit)) to a radius of 200.00
      • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Dying unit)) matching (((Unit-type of (Picked Unit)) Not equal to Habited Planet) and (((Unit-type of (Picked Unit)) Not equal to Planet) and (((Picked unit) is A structure) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
Try that.
 
Level 12
Joined
Mar 23, 2008
Messages
942
Are you sure the others units are structures?
Try storing the position into a variable and them do that action.
Try another action than kill, destroy? (I don't know if it exists)

But... really strange...
 
  • Environment - Remove Blight for (Owner of (Dying unit)) from (Position of (Dying unit)) to a radius of 200.00
    • Unit Group - Pick every unit in (Units within 200.00 of (Position of (Dying unit)) and do (Actions)
      • Loop - Actions
        • Unit - Kill (Picked unit)
I tryed this, whit and whitout varibes still nothink :con:
I used a varible as a point- position of dying unit
 
Status
Not open for further replies.
Top