- Joined
- Feb 7, 2009
- Messages
- 93
well i have in my currently spawn typed map encountered an annoying problem.
it works pretty much as its supposed to untill the game ends since when that
happens a huge lag starts, and most players have to either close warcraft3
or their computer to make it end, i have been told that its the conditions that leak.
so i need some help with my spawn trigger
im sure that there is some realy simple sollution
that i just fail to notice. And if someone can tell me how it should be then
best would be if the ansver was in gui cause i cant do jass yet.
i hope i posted right and stuff 
it works pretty much as its supposed to untill the game ends since when that
happens a huge lag starts, and most players have to either close warcraft3
or their computer to make it end, i have been told that its the conditions that leak.
so i need some help with my spawn trigger
that i just fail to notice. And if someone can tell me how it should be then
best would be if the ansver was in gui cause i cant do jass yet.
-
redvillagespawn
-
Events
-
Time - Spawntimer expires
-
-
Conditions
-
(Number of units in (Units owned by Player 1 (Red))) Less than 160
-
(Inn 0696 <gen> is alive) Equal to True
-
(Number of units in (Units owned by Player 1 (Red) of type Fort)) Less than or equal to 1
-
(Player 1 (Red) controller) Equal to User
-
-
Actions
-
Set quickusepoint = (Center of Red village <gen>)
-
Unit - Create 1 Militia for Player 1 (Red) at quickusepoint facing 0.00 degrees
-
Custom script: call RemoveLocation( udg_quickusepoint )
-
-
JASS:
function Trig_redvillagespawn_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAll(Player(0))) < 160 ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_n01X_0696) == true ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAndTypeId(Player(0), 'n01R')) <= 1 ) ) then
return false
endif
if ( not ( GetPlayerController(Player(0)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_redvillagespawn_Actions takes nothing returns nothing
set udg_quickusepoint = GetRectCenter(gg_rct_Red_village)
call CreateNUnitsAtLoc( 1, 'h003', Player(0), udg_quickusepoint, 0.00 )
call RemoveLocation( udg_quickusepoint )
endfunction
//===========================================================================
function InitTrig_redvillagespawn takes nothing returns nothing
set gg_trg_redvillagespawn = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_redvillagespawn, udg_Spawntimer )
call TriggerAddCondition( gg_trg_redvillagespawn, Condition( function Trig_redvillagespawn_Conditions ) )
call TriggerAddAction( gg_trg_redvillagespawn, function Trig_redvillagespawn_Actions )
endfunction