• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Units stop walking

Status
Not open for further replies.
Level 7
Joined
Dec 18, 2004
Messages
148
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:

Code:
[code=jass]
every 1 sec of game time

create 1 footman at (rect)
move (last created unit) to (rect)
[/code][/code]
 
Level 7
Joined
Dec 18, 2004
Messages
148
ok i fixed it so they dont stop walking but now they just .. DO NOT stop.... well here is what i did:

JASS:
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
JASS:
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
 
Status
Not open for further replies.
Top