Custom Scripts/JASS
You need to remove the locations + unit groups (you already knew that)
You code is a bit messed up too
Heres how I'd do it
Heres the short version
You need to remove the locations + unit groups (you already knew that)
You code is a bit messed up too
Heres how I'd do it
-
Actions
-
-------- I added a NoLeaks Integer because I heard somewhere that fors A + B leak (not 100% sure bout that one) --------
-
-------- Using the "For" action allows the units to be added to a temporary unit group --------
-
Set Point1 = (Center of Center Large <gen>)
-
-------- This leak keeps from making 6 centers of a region >< --------
-
For each (Integer NoLeaks) from 1 to 6, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Attacker5 for Player 12 (Brown) at Point1 facing Default building facing degrees
-
Unit Group - Add (Last created unit) to UnitGroup1
-
-
-
Set Random_Point1 = (Random point in (Playable map area))
-
Unit Group - Order UnitGroup1 to Attack-Move To Random_Point1
-
-------- For your waits, im not really sure what they effect, but you should use a timer --------
-
-------- Or, simply use a periodic event --------
-
-------- I prefer timers over periodic events (you know where they are at with their timing) --------
-
-------- If you are waiting around for a reason (all the other spawns go before this one) --------
-
-------- Then I suggest you have the other ones run this one when they are finished --------
-
Custom script: call DestroyGroup(udg_UnitGroup1)
-
Custom script: call RemoveLocation(udg_Point1)
-
Custom script: call RemoveLocation(udg_Random_Point1)
-
Custom script: set udg_UnitGroup1 = null
-
Custom script: set udg_Point1 = null
-
Custom script: set udg_Random_Point1 = null
-
Custom script: // Here are the actual leak fixes ^^^
-
Custom script: // The global variables (GUI variables) ALWAYS NEED A "udg_" before them
-
Custom script: // in the examples, "udg_" is extremely important then the variable
-
-------- I strongly suggest you learn leaks well, because loops will cause your WC to crash X_x --------
-
Wait 45.00 seconds
-
Set UnitAInt = (UnitAInt + 1)
-
Trigger - Turn on Spawns2 <gen>
-
Trigger - Run Spawns2 <gen> (checking conditions)
-
-------- I don't think your WC can crash from small leaks like this one --------
-
-------- Your crash is probably from another trigger that got f*cked up --------
-
Heres the short version
-
Actions
-
Set Point1 = (Center of Center Large <gen>)
-
For each (Integer NoLeaks) from 1 to 6, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Attacker5 for Player 12 (Brown) at Point1 facing Default building facing degrees
-
Unit Group - Add (Last created unit) to UnitGroup1
-
-
-
Set Random_Point1 = (Random point in (Playable map area))
-
Unit Group - Order UnitGroup1 to Attack-Move To Random_Point1
-
Custom script: call DestroyGroup(udg_UnitGroup1)
-
Custom script: call RemoveLocation(udg_Point1)
-
Custom script: call RemoveLocation(udg_Random_Point1)
-
Wait 45.00 seconds
-
Set UnitAInt = (UnitAInt + 1)
-
Trigger - Turn on Spawns2 <gen>
-
Trigger - Run Spawns2 <gen> (checking conditions)
-