• 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 to kill created unit

Status
Not open for further replies.
Level 2
Joined
Mar 5, 2009
Messages
7
I am working on a mini game. I have a murloc that creates an orc burrow"FireTower". I made the building red and it is supposed to be a fire type structure. The affect I was going for was to make some fire cinematic effect appear on the building when it was created. What I did was give a unit the model of the orb of fire, the ability to fly, and no movement speed. When the fire tower is created, the unit with the fire orb model is created directly over the structure creating a fire orb to rotate over the building.

Events
Unit - A unit owned by Player 1 (Red) Finishes construction

Conditions
(Unit-type of (Triggering unit)) Equal to Fire Tower

Actions
Unit - Create 1 firefly for Neutral Passive at (Position of (Constructed structure)) facing (Position of (Triggering unit))

Firefly is the unit with the fire orb model.

So this works but what I need to ask to find out how I can do is...

I want the newly created neutral passive firefly to die or dissapear when the firetower it hovers over is destroyed. Right now when one is destroyed, the firefly remains. Any ideas???
 
Level 6
Joined
May 13, 2009
Messages
260
This is not the best way but it works:
  • Killer
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Fire tower
    • Actions
      • Unit Group - Pick every unit in (Units within 50.00 of (Position of (Dying unit))) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
 
Status
Not open for further replies.
Top