• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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.
 
Level 13
Joined
Dec 21, 2010
Messages
541
  • 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