• 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.

Aos Spawning

Status
Not open for further replies.
Level 3
Joined
Dec 9, 2005
Messages
39
I have made a AOs map i no how to spawn creeps and their movement, but 4 some reason it laggs the map so much when i have the cr8ting creeps trigger turned on, and i only have creeps spawning for one team.

If anyone could help greatly apperictiated.

thx for your time.
 
Level 8
Joined
Nov 20, 2005
Messages
372
Easy answer.

You don't have to use Pick every unit in *unitgrou* and do ( multiplication actiosn )

THIS laggs very much

Better is you create triggers like

Event:A unit comes in *Spawnpoint*
Conditions:Unittype of Triggering unit equal to Creeps[Current Level]

Variables:
Creeps ( Unittype array your levelinteger )
Current Level ( integer )
 
Level 3
Joined
Dec 9, 2005
Messages
39
Acttualy i havent these are my triggers.

Creating Units:

function Trig_Human_Bot_Actions takes nothing returns nothing
set udg_Human_Bot_Point_Melee = GetRectCenter(gg_rct_Melee_Spawn_right)
set udg_Human_Bot_Point_Ranged = GetRectCenter(gg_rct_Ranged_spawn_right)
call CreateNUnitsAtLoc( 1, 'h008', Player(0), udg_Human_Bot_Point_Melee, bj_UNIT_FACING )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLoc( 1, 'h008', Player(0), udg_Human_Bot_Point_Melee, bj_UNIT_FACING )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLoc( 1, 'h008', Player(0), udg_Human_Bot_Point_Melee, bj_UNIT_FACING )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLoc( 1, 'h008', Player(0), udg_Human_Bot_Point_Melee, bj_UNIT_FACING )
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), udg_Human_Bot_Point_Ranged, bj_UNIT_FACING )
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), udg_Human_Bot_Point_Ranged, bj_UNIT_FACING )
call RemoveLocation( udg_Human_Bot_Point_Melee )
call RemoveLocation( udg_Human_Bot_Point_Ranged )
call TriggerExecute( gg_trg_Making_Unit_Group_Human_Force )
endfunction

//===========================================================================
function InitTrig_Human_Bot takes nothing returns nothing
set gg_trg_Human_Bot = CreateTrigger( )
call TriggerAddAction( gg_trg_Human_Bot, function Trig_Human_Bot_Actions )
endfunction


Moving Units:

function Trig_Start_Melee_Human_Bot_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction

function Trig_Start_Melee_Human_Bot_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_right_1st) )
endfunction

//===========================================================================
function InitTrig_Start_Melee_Human_Bot takes nothing returns nothing
set gg_trg_Start_Melee_Human_Bot = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Start_Melee_Human_Bot, gg_rct_Melee_Spawn_right )
call TriggerAddCondition( gg_trg_Start_Melee_Human_Bot, Condition( function Trig_Start_Melee_Human_Bot_Conditions ) )
call TriggerAddAction( gg_trg_Start_Melee_Human_Bot, function Trig_Start_Melee_Human_Bot_Actions )
endfunction

Times 4 lanes with only one team it laggs. is it the size of the map or the lanes? or the triggers? can someone plz help me
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
you can do the movement with really simple GUI...
Code:
CreepSpawn
    Events
        Time - Every <however many> seconds of game time
    Conditions
    Actions
        Unit - Create <however many> <unit type> for Player 1 (Red) at (Center of (<region they spawn from>)) facing Default building facing degrees
you don't even have to use another trigger for different players, just add a similar action and change the unit that spawns and for which player.

Code:
CreepMove
    Events
        Unit - A unit enters (<region they spawn from>)
    Conditions
        (Owner of (Triggering unit)) Equal to Player 1 (Red)
    Actions
        Unit - Order (Triggering unit) to Attack-Move To (Center of (<next region in lane>))
assuming of course, that player 1 is one of the players that is a computer-controlled player that spawns units.

this works cause when they spawn, they technically enter the region they spawn from. repeat that for each comp player that spawns units and for each lane, as well as for every turn in each lane.
 
Status
Not open for further replies.
Top