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

»»» MEMORY LEAK! ««« please help (and get Credits in my map)

Status
Not open for further replies.
Level 2
Joined
Jun 11, 2005
Messages
19
AARGH! i got a big problem: i got huge memory leak in my map! i tried to fix it by destroying the points and unit(group)s etc. but it doesnt help really much..
did i do it wrong? or is there something i forgot?

the way i tried is like this:
Code:
Starving
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set StarvingUnits = (Units in (Playable map area)((((Unit-type of (Matching unit)) Equal to Brave) and (((Matching unit) is alive) Equal to True)) and ((Mana of (Matching unit)) Equal to 0.00)))
        Unit Group - Pick every unit in StarvingUnits and do (Actions)
            Loop - Actions
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
                Set PingStarvingUnits = (Position of (Picked unit))
                Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Flashy ping of color (100.00%, 0.00%, 0.00%)
                Point - Remove PingStarvingUnits
                Unit Group - Destroy unit group StarvingUnits
and
Code:
Breed
    Events
        Unit - A unit Is issued an order targeting a point
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Owner of (Ordered unit)) Equal to Neutral Hostile
                (Owner of (Ordered unit)) Equal to Neutral Passive
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Crab Small
                (Number of living Crab Big units owned by Neutral Passive) Less than 50
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Set mana of (Ordered unit) to 0.00%
                Unit - Replace (Ordered unit) with a Crab Big using The old unit's relative life and mana
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Crab Big
                (Number of living Crab Small units owned by Neutral Passive) Less than 50
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 2 Crab Small for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Raccoon Small
                (Number of living Raccoon Big units owned by Neutral Passive) Less than 25
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Unit - Set mana of (Ordered unit) to 0.00%
                Unit - Replace (Ordered unit) with a Raccoon Big using The old unit's relative life and mana
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Raccoon Big
                (Number of living Raccoon Small units owned by Neutral Passive) Less than 25
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 2 Raccoon Small for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Fish
                (Number of living Fish units owned by Neutral Passive) Less than 125
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 1 Fish for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Snake
                (Number of living Snake units owned by Neutral Hostile) Less than 15
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 1 Snake for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions
did i do something wrong?
any help is appreciated
~MP
 
Level 2
Joined
Jun 11, 2005
Messages
19
so its more like this?
Code:
Starving
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set StarvingUnits = (Units in (Playable map area)((((Unit-type of (Matching unit)) Equal to Brave) and (((Matching unit) is alive) Equal to True)) and ((Mana of (Matching unit)) Equal to 0.00)))
        Unit Group - Pick every unit in StarvingUnits and do (Actions)
            Loop - Actions
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
                Set PingStarvingUnits = (Position of (Picked unit))
                Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Flashy ping of color (100.00%, 0.00%, 0.00%)
                Point - Remove PingStarvingUnits
        Unit Group - Destroy unit group StarvingUnits
        Custom script: set udg_StarvingUnits = null
 
Level 2
Joined
Jun 11, 2005
Messages
19
hmm.. it still doesnt help any more.. please someone help me..
maybe i could give someone the map, so he can see in the triggers what's wrong?
please send me an email if you want the map:
[email protected]

btw.. i NEVER protect my maps.. im against it
but, i used WEU for this map, so you cant open it with the normal WE

please help as fast as possible!
any help is appreciated!!

~MP Productions©
 
Status
Not open for further replies.
Top