Hello.
A few months ago, I decided to learn the world editor. Ive used hive a lot, reading through tutorials and all.
I have checked the leaks tutorials, but the below trigger still leaks for a reason i cannot wrap my head around.
Killing around ~1500 units created with this trigger will gradually drop my framerate to around 2 FPS, but the trickiest part is it WILL actually go back to a decent 25 fps after some time, then drop BACK (without any actions taken during this time) to 2 FPS. Then it will just keep fluctuating. (explanation isn't very clear, but it's the best i could do to try to capture the symptoms).
(also, note that warcraft 3's memory only shows an increase of ~150 mb, from 150 to 300 during this whole procedure. Much less than it would usually take for an application to clog my computer's memory).
Anyways, here's the trigger:
A few months ago, I decided to learn the world editor. Ive used hive a lot, reading through tutorials and all.
I have checked the leaks tutorials, but the below trigger still leaks for a reason i cannot wrap my head around.
Killing around ~1500 units created with this trigger will gradually drop my framerate to around 2 FPS, but the trickiest part is it WILL actually go back to a decent 25 fps after some time, then drop BACK (without any actions taken during this time) to 2 FPS. Then it will just keep fluctuating. (explanation isn't very clear, but it's the best i could do to try to capture the symptoms).
(also, note that warcraft 3's memory only shows an increase of ~150 mb, from 150 to 300 during this whole procedure. Much less than it would usually take for an application to clog my computer's memory).
Anyways, here's the trigger:
-
ScuttlerSpawn1
-
Events
- Time - Every 0.20 seconds of game time
- Conditions
-
Actions
- Set Temp_Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Scuttler))
- Set tempPoint = (Random point in Scuttler Den 1 <gen>)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Temp_Group) Greater than or equal to 15
- Then - Actions
-
Else - Actions
- Unit - Create 1 Scuttler for Neutral Hostile at tempPoint facing (Random angle) degrees
-
If - Conditions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call RemoveLocation(udg_tempPoint)
-
Events