[code]function spawnAll(self)
testSpawnTimer = CreateTimer("testSpawnTimer")
SetTimerValue(testSpawnTimer, 1)
testSpawnTimer2 = CreateTimer("testSpawnTimer2")
SetTimerValue(testSpawnTimer2, 1)
local i = 0
local j = 0
OnTimerElapse(
function(timer)
local point = GetPathPoint("normal_ammo_spawn2", i)
print("Spawning normal ammo ", i)
CreateEntity("com_item_powerup_dual", powerspawn, "powerup"..i)
SetEntityMatrix(players_alive[1].playerUnit, point)
i = i + 1
if i > 19 then
StartTimer(testSpawnTimer2)
else
SetTimerValue(testSpawnTimer, 1)
StartTimer(testSpawnTimer)
end
end,
testSpawnTimer
)
OnTimerElapse(
function(timer)
local point = GetPathPoint("special_ammo_spawn3", j)
print("Spawning special ammo ", j)
CreateEntity("com_item_powerup_antiammo", powerspawn, "powerup"..j)
SetEntityMatrix(players_alive[1].playerUnit, point)
j = j + 1
if j <= 11 then
SetTimerValue(testSpawnTimer2, 1)
StartTimer(testSpawnTimer2)
end
end,
testSpawnTimer2
)
StartTimer(testSpawnTimer)
for i = 0, 15 do
armorspawn = GetPathPoint("armor_spawn2", i)
print("Spawning armor ", i)
CreateEntity("com_item_powerup_armor", armorspawn, "armor"..i)
end
cp1_ammospawn1 = GetPathPoint("cp1_spawn", 0)
cp1_ammospawn2 = GetPathPoint("cp1_spawn", 1)
cp2_ammospawn1 = GetPathPoint("cp2_spawn", 0)
cp2_ammospawn2 = GetPathPoint("cp2_spawn", 1)
cp3_ammospawn1 = GetPathPoint("cp3_spawn", 0)
cp3_ammospawn2 = GetPathPoint("cp3_spawn", 1)
cp4_ammospawn1 = GetPathPoint("cp4_spawn2", 0)
cp4_ammospawn2 = GetPathPoint("cp4_spawn2", 1)
CreateEntity("com_item_powerup_dual", cp1_ammospawn1, "ammo1")
CreateEntity("com_item_powerup_dual", cp1_ammospawn2, "ammo2")
CreateEntity("com_item_powerup_dual", cp2_ammospawn1, "ammo3")
CreateEntity("com_item_powerup_dual", cp2_ammospawn2, "ammo4")
CreateEntity("com_item_powerup_dual", cp2_ammospawn1, "ammo5")
CreateEntity("com_item_powerup_dual", cp3_ammospawn2, "ammo6")
CreateEntity("com_item_powerup_dual", cp4_ammospawn1, "ammo7")
CreateEntity("com_item_powerup_dual", cp4_ammospawn2, "ammo8")
return
end[/code]