im making a project, and i want to use most efficient code i can to make my map good as other do!!!
Map size 256 x 256
Over 400-500 mobs
Problem : imagin 10 player that gather over 50 mobs and kill them over time(5min exemple) huge lag happened with most gui system i tryed
System required :
Can use Jnpg editor aka newjassGen
Work on Specific region named as : CreepPoint1,CreepPoint2,CreepPoint3,CreepPoint4,
map contain over 400 mobs as Neutral hostile
Hope its could use X & Y value for location since they dont lag!!
since this forum love jass, i hope some1 will able to help me
, im starting to learn jass but..... i kind of bad....
there is the code i have now, i would like it to use region in condition and unit x & Y as position
Map size 256 x 256
Over 400-500 mobs
Problem : imagin 10 player that gather over 50 mobs and kill them over time(5min exemple) huge lag happened with most gui system i tryed
System required :
Can use Jnpg editor aka newjassGen
Work on Specific region named as : CreepPoint1,CreepPoint2,CreepPoint3,CreepPoint4,
map contain over 400 mobs as Neutral hostile
Hope its could use X & Y value for location since they dont lag!!
since this forum love jass, i hope some1 will able to help me
there is the code i have now, i would like it to use region in condition and unit x & Y as position
JASS:
function Trig_Respawn01_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Respawn01_Actions takes nothing returns nothing
local unit u = GetDyingUnit()
local location l = GetUnitLoc(u)
local real facing = GetUnitFacing(u)
call TriggerSleepAction( 10.00 ) //This is the wait time.
call CreateNUnitsAtLoc( 1, GetUnitTypeId(u), Player(PLAYER_NEUTRAL_AGGRESSIVE), l, facing )
call RemoveLocation(l)
endfunction
//===========================================================================
function InitTrig_Respawn01 takes nothing returns nothing
set gg_trg_Respawn01 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Respawn01, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Respawn01, Condition( function Trig_Respawn01_Conditions ) )
call TriggerAddAction( gg_trg_Respawn01, function Trig_Respawn01_Actions )
endfunction