• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Leaking Trigger

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2011
Messages
460
For whatever reason this trigger is no longer working, I don't know what happened, something might have been deleted when i had someone look at the map on accident, I can't find it.
  • Flame Explosion
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Flame Explosion (Neutral Hostile)
    • Actions
      • Unit - Create 1 dummy_fireball for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Remove (Last created unit) from the game
      • Unit - Create 1 dummy_explode for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Unit Group - Pick every unit in (Units within 350.00 of (Target point of ability being cast)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
            • Else - Actions
              • Unit - Cause (Casting unit) to damage (Picked unit), dealing ((2.50 x (Real((Intelligence of (Casting unit) (Include bonuses))))) + (50.00 x (Real((Level of (Ability being cast) for (Casting unit)))))) damage of attack type Spells and damage type Magic
      • Wait 1.00 seconds
      • Unit - Remove (Last created unit) from the game
 
You use waits and you still refer to the target point of ability being cast and the caster.
  • Set Unit = (Triggering unit)
  • Set Point1 = (Target point of ability being cast)
  • Unit - Create 1 dummy_fireball for (Triggering player) at Point1 facing Default building degrees
  • Unit - Add a 1.00 seconds generic expiration timer to (Last created unit)
  • Unit - Create 1 dummy_explode for (Triggering player) at Point1 facing Default building degrees
  • Unit - Add a 1.00 second generic expiration to (Last created unit)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 350.00 of Point1 matching ((((Matching unit) is a Hero) Equal to True) and ((Matching unit) belongs to an enemy of (Triggering player)) Equal to True) and do (Actions)
    • Loop - Actions
      • Unit - Cause Unit to damage (Picked unit), dealing ((2.50 x (Real((Intelligence of Unit (Include bonuses))))) + (50.00 x (Real((Level of (Ability being cast) for Unit))))) damage of attack type Spells and damage type Magic
  • Custom script: call RemoveLocation (udg_Point1)
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,156
Unit - Create 1 dummy_fireball for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
Wait 1.00 seconds
Unit - Remove (Last created unit) from the game
This not only leaks if the spell is cast before the dummy is removed, but removing units leaks due to engine bugs in WC3. Make the unit time expire after 1 second rather and let natural death remove them.

Unit Group - Pick every unit in (Units within 350.00 of (Target point of ability being cast)) and do (Actions)
Leaks a group and location object, you allocate these objects but never deallocate them.

Wait 1.00 seconds
Unit - Remove (Last created unit) from the game
Same as first leak, you must add an expiration timer to the unit and let natural death recycle it.
 
Status
Not open for further replies.
Top