• 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] Dummy cast spell after death

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2015
Messages
53
  • alchpass Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Acid Bomb for (Dying unit)) Greater than or equal to 1
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Dying unit)) Equal to Mountain King
            • Then - Actions
              • Unit - Add Flame Strike to (Last created unit)
              • Unit - Create 1 DummyI for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
              • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Position of (Dying unit))
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
How can I modify it to make only 1 dummy spawn and cast spell?
With current triggers around 100 dummys appear because trigger is detecting death of unit more then once.
 
  • alchpass Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Mountain King
      • (Level of Acid Bomb for (Dying unit)) Greater than or equal to 1
    • Actions
      • Set - Temp_Point[0] = Position of Dying unit
      • Set - Temp_Group = Units within 500 of (Temp_Point[0]) matching ((Matching unit is alive equal to true) and (Matching unit belongs to enemy of (Owner of killing unit)) equal to true)
      • Unit Group - Pick every unit in (Temp_Group) and do (Actions)
        • Loop - Actions
          • Set - Temp_Point[1] = Position of Picked Unit
          • Unit - Create 1 DummyI for (Owner of (Dying unit)) at (Temp_Point[1]) facing Default building facing degrees
          • Unit - Add Flame Strike to (Last created unit)
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike Tem_Point[1]
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Custom script: RemoveLocation ( udg_Temp_Point[1])
      • Custom script: RemoveLocation ( udg_Temp_Point[0])
      • Custom script: call DestroyGroup( udg_Temp_Group)
first...you need to set variables for the Points and for the Group so you will able to destroy them to avoid LEAKS!!

you have to put a condition if picked unit is alive in-order not to picked those dead units..
 
Last edited:
Status
Not open for further replies.
Top