- Joined
- Aug 7, 2004
- Messages
- 875
Creep Spawn Variable
Timer
Spawn
The system seems to work fine and in fact it does except for one crucial bug that gets my but soar! When playing multiplayer, SOMETIMES, the creep spawn overspawns... which means that the system keeps spawning one type of unit in a current level continiously, mostly around the levels from 8-22... Ok now this bug isn't good because seriously it will hang your computer and crash it. I've asked a couple of people back at www.wc3sear.ch and they say it is memory leak. Well I think i've preety much fixed the memory leak but still the creep overspawn keeps happening. I am desperate for help! I need someone to help me solve this issue.
Thanks
Code:
Events
Map initialization
Conditions
Actions
Unit Group - Add Demolisher 0136 <gen> to Demolishers
Unit Group - Add Demolisher 0143 <gen> to Demolishers
Unit Group - Add Demolisher 0117 <gen> to Demolishers
Unit Group - Add Demolisher 0129 <gen> to Demolishers
-------- Level 1 --------
Set UnIt_TyPe[1] = Ghoul
Set UnIt_TyPe_VaR_TwO[1] = Dark Ghoul
Set UnIt_TyPe_VaR_ThReE[1] = Zombies
Set UnIt_AmOuNt[1] = 3
Set UnIt_AmOuNt_VaR_TwO[1] = 1
Set UnIt_AmOuNt_VaR_ThReE[1] = 1
Set Lvl_num = 0
-------- Level 2 --------
Set UnIt_TyPe[2] = Dark Ghoul
Set UnIt_TyPe_VaR_TwO[2] = Ghoul
Set UnIt_TyPe_VaR_ThReE[2] = Zombies
Set UnIt_AmOuNt[2] = 2
Set UnIt_AmOuNt_VaR_TwO[2] = 2
Set UnIt_AmOuNt_VaR_ThReE[2] = 1
-------- Level 3 --------
Set UnIt_TyPe[3] = Zombies
Set UnIt_TyPe_VaR_TwO[3] = Dark Ghoul
Set UnIt_TyPe_VaR_ThReE[3] = Light Trolls
Set UnIt_AmOuNt[3] = 2
Set UnIt_AmOuNt_VaR_TwO[3] = 2
Set UnIt_AmOuNt_VaR_ThReE[3] = 1
-------- Level 4 --------
Set UnIt_TyPe[4] = Light Trolls
Set UnIt_TyPe_VaR_TwO[4] = Zombies
Set UnIt_TyPe_VaR_ThReE[4] = Immolated Ghoul
Set UnIt_AmOuNt[4] = 2
Set UnIt_AmOuNt_VaR_TwO[4] = 2
Set UnIt_AmOuNt_VaR_ThReE[4] = 1
-------- Level 5 (BOSS) --------
Set UnIt_TyPe[5] = Harbinger Witch
Set UnIt_TyPe_VaR_TwO[5] = Harbinger Witch
Set UnIt_TyPe_VaR_ThReE[5] = Harbinger Witch
Set UnIt_AmOuNt[5] = 1
Set UnIt_AmOuNt_VaR_TwO[5] = 0
Set UnIt_AmOuNt_VaR_ThReE[5] = 0
.....
Timer
Code:
Actions
Sound - Play ItemReceived <gen>
Game - Display to (All players) the text: Be prepared they ar...
Wait 0.05 seconds
Countdown Timer - Start RoundWindow as a Repeating timer that will expire in 70.00 seconds
Set RoundWindow = (Last started timer)
Countdown Timer - Create a timer window for (Last started timer) with title |c00990000Enemy Wav...
Spawn
Code:
Events
Time - RoundWindow expires
Conditions
Actions
Sound - Play QuestFailed <gen>
Set Lvl_num = (Lvl_num + 1)
Game - Display to (All players) the text: |c00FF0000The enemy...
Game - Display to (All players) the text: (|c00999900Round + (|c00990000 + ((String(Lvl_num)) + (|r + |c00999900has started!|r))))
Set loc[1] = (Center of Corner BR <gen>)
Set loc[2] = (Center of Corner BL <gen>)
Set loc[3] = (Center of Corner BL2 <gen>)
Set loc[4] = (Center of Corner TL2 <gen>)
Set loc[5] = (Center of Corner TL <gen>)
Set loc[6] = (Center of Corner TR <gen>)
Set loc[7] = (Center of Corner TR2 <gen>)
Set loc[8] = (Center of Corner BR2 <gen>)
Set m[1] = (Center of B MoVe To <gen>)
Set m[2] = (Center of L2s MoVe To <gen>)
Set m[3] = (Center of T MoVe To <gen>)
Set m[4] = (Center of R2s MoVe To <gen>)
Wait 1.00 seconds
For each (Integer A) from 1 to UnIt_AmOuNt[Lvl_num], do (Actions)
Loop - Actions
Set incrementx = 1
Set incrementy = 1
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Unit - Create 1 UnIt_TyPe[Lvl_num] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To m[incrementx]
Unit - Create 1 UnIt_TyPe[Lvl_num] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To m[incrementx]
Set incrementx = (incrementx + 1)
Set incrementy = (incrementy + 2)
Wait 0.75 seconds
For each (Integer A) from 1 to UnIt_AmOuNt_VaR_ThReE[Lvl_num], do (Actions)
Loop - Actions
Set incrementx = 1
Set incrementy = 1
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Unit - Create 1 UnIt_TyPe_VaR_ThReE[Lvl_num] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To m[incrementx]
Unit - Create 1 UnIt_TyPe_VaR_ThReE[Lvl_num] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To m[incrementx]
Set incrementx = (incrementx + 1)
Set incrementy = (incrementy + 2)
Wait 0.75 seconds
For each (Integer A) from 1 to UnIt_AmOuNt_VaR_TwO[Lvl_num], do (Actions)
Loop - Actions
Set incrementx = 1
Set incrementy = 1
For each (Integer B) from 1 to 4, do (Actions)
Loop - Actions
Unit - Create 1 UnIt_TyPe_VaR_TwO[Lvl_num] for Player 12 (Brown) at loc[incrementy] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To m[incrementx]
Unit - Create 1 UnIt_TyPe_VaR_TwO[Lvl_num] for Player 12 (Brown) at loc[(incrementy + 1)] facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To m[incrementx]
Set incrementx = (incrementx + 1)
Set incrementy = (incrementy + 2)
Wait 0.75 seconds
Custom script: call RemoveLocation( udg_m[1] )
Custom script: call RemoveLocation( udg_m[2] )
Custom script: call RemoveLocation( udg_m[3] )
Custom script: call RemoveLocation( udg_m[4] )
Custom script: call RemoveLocation( udg_loc[1] )
Custom script: call RemoveLocation( udg_loc[2] )
Custom script: call RemoveLocation( udg_loc[3] )
Custom script: call RemoveLocation( udg_loc[4] )
Custom script: call RemoveLocation( udg_loc[5] )
Custom script: call RemoveLocation( udg_loc[6] )
Custom script: call RemoveLocation( udg_loc[7] )
Custom script: call RemoveLocation( udg_loc[8] )
The system seems to work fine and in fact it does except for one crucial bug that gets my but soar! When playing multiplayer, SOMETIMES, the creep spawn overspawns... which means that the system keeps spawning one type of unit in a current level continiously, mostly around the levels from 8-22... Ok now this bug isn't good because seriously it will hang your computer and crash it. I've asked a couple of people back at www.wc3sear.ch and they say it is memory leak. Well I think i've preety much fixed the memory leak but still the creep overspawn keeps happening. I am desperate for help! I need someone to help me solve this issue.
Thanks