• 🏆 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] Leak help spell

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
  • Unit Group - Pick every unit in (Units within 64.00 of PH_Hook_Point[PH_Index[3]] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of PH_Caster[PH_Index[3]])) Equal to True))) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked unit) is Magic Immune) Equal to False
          • PH_Hooked_Is[PH_Index[3]] Equal to False
        • Then - Actions
          • Set PH_Hooked_Unit[PH_Index[3]] = (Picked unit)
          • Set PH_Hooked_Is[PH_Index[3]] = True
          • Unit - Pause (Picked unit)
          • Unit - Turn collision for (Picked unit) Off
          • Unit - Cause PH_Caster[PH_Index[3]] to damage (Picked unit), dealing (Real(PH_Damage)) damage of attack type Spells and damage type Lightning
        • Else - Actions
This leaks. Pick every units in. I can move enemy buildings with the hook.

(Line: 24) (Word: 7) Unit Group Leak
Unit Group - Pick every unit in (Units within 64.00 of PH_Hook_Point[PH_Index[3]] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of PH_Caster[PH_Index[3]])) Equal to True))) and do (Actions)
Unit Group - Pick every unit in ^Leak

Scan Complete
Location leaks: 0
Special Effect leaks: 0
Lightning leaks: 0
Unit Group leaks: 1
Player Group leaks: 0

Variables
PH_Dummy_Point[PH_Index[3]] : (Line: 17) Location - Removed: No
PH_Hook_Point[PH_Index[3]] : (Line: 18) Location - Removed: No
PH_Dummy_Point[PH_Index[3]] : (Line: 52) Location - Removed: No
PH_Hook_Point[PH_Index[3]] : (Line: 53) Location - Removed: No

How do i fix it? Im not pro at gui but i wil learn now because it seems like no oen know how to remove leaks so any pro help me here.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

The leaks that need to me fixed at the end of the trigger:
  • Custom script: call RemoveLocation(udg_PH_Hook_Point[PH_Index[3]])
  • Custom script: set PH_Hooked_Unit[PH_Index[3]] = null
  • Custom script: set PH_Caster[PH_Index[3]] = null
Edit: Ahh and at the top of this (before you pick every units to a unit group) you have to use:
  • Custom script: set bj_wantDestroyGroup = true
Greetings
~The Bomb King > Dr. Boom
 
Status
Not open for further replies.
Top