Warcraft III resources & community, 2003–2006 · archived

Units stop walking

5 posts
#1

Units stop walking

Hey i am makeing a map with alot of units on at once(500-600). The units walk fine at first, but after they meet the enemy and attack, the stop walking and sit there waiting for their turn to attack (this is bad because it makes them pile up = alot of lag). So how would i fix this?

this is what i did:


[jass]
every 1 sec of game time

create 1 footman at (rect)
move (last created unit) to (rect)
[/jass]
[/jass]
#2
That problem was discussed pretty heavily in this topic:

http://www.wc3sear.ch/viewtopic.php?t=16046

But to put iot short: Thats too many units to be moved by a single AI. Like human players, they can only manage 12 units at a time. You need to add in more AI players and divvy up the units among them evenly so they have less to control.
-VGsatomi
#3
ok i fixed it so they dont stop walking but now they just .. DO NOT stop.... well here is what i did:


function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, 'hfoo', Player(8), GetRectCenter(gg_rct_Region_000_Copy_Copy_2_Copy_Copy), bj_UNIT_FACING )
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetRectCenter(gg_rct_Region_044) )
    call GroupAddUnitSimple( GetLastCreatedUnit(), udg_units[1] )
    call CreateNUnitsAtLoc( 1, 'hfoo', Player(8), GetRectCenter(gg_rct_Region_000_Copy_5_Copy_Copy), bj_UNIT_FACING )
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetRectCenter(gg_rct_Region_044) )
    call GroupAddUnitSimple( GetLastCreatedUnit(), udg_units[1] )
    call CreateNUnitsAtLoc( 1, 'hfoo', Player(8), GetRectCenter(gg_rct_Region_000_Copy_3_Copy_Copy_Copy), bj_UNIT_FACING )
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetRectCenter(gg_rct_Region_044) )
    call GroupAddUnitSimple( GetLastCreatedUnit(), udg_units[1] )
    call CreateNUnitsAtLoc( 1, 'hfoo', Player(8), GetRectCenter(gg_rct_Region_000_Copy_2_Copy_Copy_Copy), bj_UNIT_FACING )
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetRectCenter(gg_rct_Region_044) )
    call GroupAddUnitSimple( GetLastCreatedUnit(), udg_units[1] )
    call CreateNUnitsAtLoc( 1, 'hfoo', Player(8), GetRectCenter(gg_rct_Region_000_Copy_Copy_Copy_Copy), bj_UNIT_FACING )
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetRectCenter(gg_rct_Region_044) )
    call GroupAddUnitSimple( GetLastCreatedUnit(), udg_units[1] )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 1.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction


part 2

function Trig_Untitled_Trigger_002_Func001002 takes nothing returns nothing
    call IssuePointOrderLocBJ( GroupPickRandomUnit(GetRandomSubGroup(1000000000, udg_units[1])), "move", GetRectCenter(gg_rct_Region_044) )
endfunction

function Trig_Untitled_Trigger_002_Func002002 takes nothing returns nothing
    call IssuePointOrderLocBJ( GroupPickRandomUnit(GetRandomSubGroup(1000000000, udg_units[2])), "move", GetRectCenter(gg_rct_Region_044_Copy) )
endfunction

function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    call ForGroupBJ( udg_units[1], function Trig_Untitled_Trigger_002_Func001002 )
    call ForGroupBJ( udg_units[2], function Trig_Untitled_Trigger_002_Func002002 )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_002 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_002, 3.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction
#4
u are suppose to order them to attack-move else they just move without attacking, replace "move" with "attack" in the second part.
#5
if they r creeps u have to make their return seconds and distants so they walk normaly