• 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.

how shud i fix the end leak

Status
Not open for further replies.
Level 6
Joined
Oct 10, 2013
Messages
173
Please guy's do not steal the spell i gonna repair the leak then upload it
here
  • Kamehameha Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kamehameha
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (KH_UnitGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn on Kamehameha Loop <gen>
        • Else - Actions
      • -------- Preset Variables --------
      • Set KH_Caster = (Triggering unit)
      • Set KH_Intelligence = (Intelligence of KH_Caster (Exclude bonuses))
      • Set KH_TargetUnit = (Target unit of ability being cast)
      • -------- Hashtable Saves --------
      • Hashtable - Save Handle OfKH_Caster as 0 of (Key (Triggering unit)) in KH_Hashtable
      • Hashtable - Save KH_Intelligence as 1 of (Key (Triggering unit)) in KH_Hashtable
      • Hashtable - Save Handle OfKH_TargetUnit as 2 of (Key (Triggering unit)) in KH_Hashtable
      • Hashtable - Save (2.00 x (Real(KH_Intelligence))) as 3 of (Key (Triggering unit)) in KH_Hashtable
      • Hashtable - Save Handle OfKH_DummyGroup as 4 of (Key (Triggering unit)) in KH_Hashtable
      • Hashtable - Save 0.00 as 6 of (Key (Triggering unit)) in KH_Hashtable
      • -------- Now run proper actions --------
      • Unit Group - Add KH_Caster to KH_UnitGroup
      • -------- Special effects --------
      • -------- for hashtable, save effects from 15-25 --------
      • Special Effect - Create a special effect attached to the hand right of KH_Caster using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
      • Hashtable - Save Handle Of(Last created special effect) as 15 of (Key (Triggering unit)) in KH_Hashtable
      • -------- Create Main Unit --------
      • Set KH_temppoint = (Position of KH_Caster)
      • Set KH_tempreal = (Angle from KH_temppoint to KH_TargetPoint)
      • Set KH_temppoint2 = (KH_temppoint offset by 20.00 towards KH_tempreal degrees)
      • Unit - Create 1 KH_Head for (Owner of KH_Caster) at KH_temppoint2 facing Default building facing degrees
      • Hashtable - Save Handle Of(Last created unit) as 5 of (Key (Triggering unit)) in KH_Hashtable
      • -------- Remove Leaks --------
      • Custom script: call RemoveLocation(udg_KH_temppoint)
      • Custom script: call RemoveLocation(udg_KH_temppoint2)
and loop
  • Kamehameha Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in KH_UnitGroup and do (Actions)
        • Loop - Actions
          • Set KH_tempunit = (Picked unit)
          • Set KH_TargetPoint = (Position of (Load 2 of (Key (Picked unit)) in KH_Hashtable))
          • Set KH_Damage = (Load 3 of (Key (Picked unit)) from KH_Hashtable)
          • Set KH_DummyGroup = (Load 4 of (Key (Picked unit)) in KH_Hashtable)
          • Set KH_DummyUnit = (Load 5 of (Key (Picked unit)) in KH_Hashtable)
          • Set KH_temppoint3 = (Position of KH_DummyUnit)
          • Set KH_tempreal4 = (Angle from KH_temppoint3 to KH_TargetPoint)
          • Set KH_temppoint4 = (KH_temppoint3 offset by 25.00 towards KH_tempreal4 degrees)
          • Set KH_tempreal2 = (Distance between KH_temppoint3 and KH_TargetPoint)
          • Hashtable - Save ((Load 6 of (Key (Picked unit)) from KH_Hashtable) + 0.03) as 6 of (Key (Picked unit)) in KH_Hashtable
          • Unit - Move KH_DummyUnit instantly to KH_temppoint4
          • Custom script: call RemoveLocation(udg_KH_temppoint4)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 6 of (Key (Picked unit)) from KH_Hashtable) Less than 1.50
              • KH_tempreal2 Greater than 10.00
            • Then - Actions
              • -------- Create Trails --------
              • Unit - Create 1 KH_Trail for (Owner of KH_tempunit) at KH_temppoint3 facing Default building facing degrees
              • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
              • Unit Group - Add (Last created unit) to KH_DummyGroup
              • Hashtable - Save Handle OfKH_DummyGroup as 4 of (Key (Picked unit)) in KH_Hashtable
              • Set KH_tempgroup = (Units within 50.00 of KH_temppoint3 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of KH_tempunit)) Equal to True))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in KH_tempgroup) Greater than 0
                • Then - Actions
                  • -------- Damage all units --------
                  • Unit - Create 1 KH_Explosion for (Owner of KH_tempunit) at KH_temppoint3 facing Default building facing degrees
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 250.00 of KH_temppoint3 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of KH_tempunit)) Equal to True)))) and do (Actions)
                    • Loop - Actions
                      • Unit - Cause KH_tempunit to damage (Picked unit), dealing KH_Damage damage of attack type Chaos and damage type Force
                  • Custom script: call RemoveLocation(udg_KH_temppoint3)
                  • Unit Group - Pick every unit in KH_DummyGroup and do (Actions)
                    • Loop - Actions
                      • Set KH_timer = (KH_timer + 0.05)
                      • Unit - Add a (((Real((Number of units in KH_DummyGroup))) / (Real((Number of units in KH_DummyGroup)))) + KH_timer) second Generic expiration timer to (Picked unit)
                  • Unit - Remove KH_DummyUnit from the game
                  • Special Effect - Destroy (Load 15 of (Key (Picked unit)) in KH_Hashtable)
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in KH_Hashtable
                  • Unit Group - Remove KH_tempunit from KH_UnitGroup
                • Else - Actions
              • Custom script: call DestroyGroup(udg_KH_tempgroup)
            • Else - Actions
              • -------- Damage all units --------
              • Unit - Create 1 KH_Explosion for (Owner of KH_tempunit) at KH_temppoint3 facing Default building facing degrees
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 250.00 of KH_temppoint3 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of KH_tempunit)) Equal to True)))) and do (Actions)
                • Loop - Actions
                  • Unit - Cause KH_tempunit to damage (Picked unit), dealing KH_Damage damage of attack type Chaos and damage type Force
              • Custom script: call RemoveLocation(udg_KH_temppoint3)
              • Unit Group - Pick every unit in KH_DummyGroup and do (Actions)
                • Loop - Actions
                  • Set KH_timer = (KH_timer + 0.05)
                  • Unit - Add a (((Real((Number of units in KH_DummyGroup))) / (Real((Number of units in KH_DummyGroup)))) + KH_timer) second Generic expiration timer to (Picked unit)
              • Unit - Remove KH_DummyUnit from the game
              • Special Effect - Destroy (Load 15 of (Key (Picked unit)) in KH_Hashtable)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in KH_Hashtable
              • Unit Group - Remove KH_tempunit from KH_UnitGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (KH_UnitGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
and the map
 

Attachments

  • Kamehameha.w3x
    29.3 KB · Views: 91
Use hidden tags. It is stretching the page.

This should be stored in a variable. (Key (Triggering unit))
Anything used twice or more should be stored into a variable.
You also store picked unit in a variable and i don't think you ever use it lol. Use it instead of calling picked unit again.

JASS:
function CountUnitsInGroup takes group g returns integer
    // If the user wants the group destroyed, remember that fact and clear
    // the flag, in case it is used again in the callback.
    local boolean wantDestroy = bj_wantDestroyGroup
    set bj_wantDestroyGroup = false

    set bj_groupCountUnits = 0
    call ForGroup(g, function CountUnitsInGroupEnum)

    // If the user wants the group destroyed, do so now.
    if (wantDestroy) then
        call DestroyGroup(g)
    endif
    return bj_groupCountUnits
endfunction

Checking for units in range that match condition also leaks a group handle that can't be fixed in GUI.

Checking for if unit group is empty also leaks. You have to set bj_WantDestroyGroup = true before you check for that.
 
Level 6
Joined
Oct 10, 2013
Messages
173
Um can u upload the map with fix i will mention ur name in credit + rep if u do

As in map u see the left out shadow after the spell which is nothing but effect i setted units\dummy units with shadow in case of leaks
so please show me how must i remove the kh_explosion leak..
 
Last edited by a moderator:

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
Um can u upload the map with fix i will mention ur name in credit + rep if u do

As in map u see the left out shadow after the spell which is nothing but effect i setted units\dummy units with shadow in case of leaks
so please show me how must i remove the kh_explosion leak..

If i fix it.. I'll upload it by myself :3
 
Status
Not open for further replies.
Top