- 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:
and
did i do something wrong?
any help is appreciated
~MP
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
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
any help is appreciated
~MP