Post Fri Dec 03, 2010 12:07 pm

ZCT - Smash & Grab - _k - Contest Filler

Don't forget the levelgen that randomizes the first flag!
Level:
  Code:
ZoneControlGameType 9 16
LevelName Smash & Grab
LevelDescription
LevelCredits
Script sag.levelgen
GridSize 255
MinPlayers 0
MaxPlayers 0
Team Blue 0 0 1
Team Red 1 0 0
BarrierMaker 50 -0.3 -4.2  -0.8 -4.5  0 -5  0.8 -4.5  0.3 -4.2
BarrierMaker 35 -0.5 0.2  -0.8 0  -0.5 -0.2
BarrierMaker 50 -7.6 0.3  -8 0.5  -8.8 0  -8 -0.5  -7.6 -0.3
BarrierMaker 50 0.3 4.2  0.8 4.5  0 5  -0.8 4.5  -0.3 4.2
BarrierMaker 50 -0.8 -4.5  -0.3 -4.2  -7.6 -0.3  -8 -0.5
BarrierMaker 50 -8 0.5  -7.6 0.3  -0.3 4.2  -0.8 4.5
BarrierMaker 50 7.6 -0.3  8 -0.5  8.8 0  8 0.5  7.6 0.3
BarrierMaker 50 8 -0.5  7.6 -0.3  0.3 -4.2  0.8 -4.5
BarrierMaker 50 0.8 4.5  0.3 4.2  7.6 0.3  8 0.5
BarrierMaker 35 0.2 0.4  1.49012e-008 0.5  -0.2 0.4
BarrierMaker 35 0.5 -0.2  0.8 0  0.5 0.2
BarrierMaker 35 -0.2 -0.4  -1.49012e-008 -0.5  0.2 -0.4
BarrierMaker 50 -0.8 -3.5  0 -3  0.8 -3.5
BarrierMaker 50 -0.8 3.5  0 3  0.8 3.5
BarrierMaker 50 -6.3 -0.5  -5.5 0  -6.3 0.5
BarrierMaker 50 6.3 -0.5  5.5 0  6.3 0.5
BarrierMaker 50 -2 -0.3  -0.4 -1.2
BarrierMaker 50 -2 0.3  -0.4 1.2
BarrierMaker 50 2 0.3  0.4 1.2
BarrierMaker 50 2 -0.3  0.4 -1.2
BarrierMaker 50 -0.8 1.8  0 2.3  0.8 1.8
BarrierMaker 50 -0.8 -1.8  0 -2.3  0.8 -1.8
BarrierMaker 50 2.3 -1  4 0  2.3 1
BarrierMaker 50 -2.4 -1  -4.1 0  -2.4 1
BarrierMaker 50 -2.8 -0.2  -2.8 0.2
BarrierMaker 50 2.8 -0.2  2.8 0.2
LoadoutZone 1 0.748039 1.71686  -5.96046e-008 2.18439  -0.748039 1.71686
FlagSpawn -1 0 -4.5  30
FlagSpawn -1 8 0  30
FlagSpawn -1 0 -3.5  30
GoalZone -1 -0.67628 -2.23517e-008  -7.45058e-009 -0.423272  0.67628 -1.49012e-008  2.6077e-008 0.423272
LoadoutZone 0 -5.96046e-008 -2.18439  0.748039 -1.71686  -0.748039 -1.71686
FlagSpawn -1 0 4.5  30
FlagSpawn -1 0 3.5  30
FlagSpawn -1 6.3 0  30
RepairItem -3.6 0  20
RepairItem 3.5 0  20
FlagSpawn -1 -6.3 0  30
FlagSpawn -1 -8 0  30
Spawn 1 -3 0.1
Spawn 0 3 -0.1
Spawn 1 3 0.1
Spawn 0 0 -1.6
Spawn 1 0 -1.4
Spawn 0 0 1.4
Spawn 1 0 1.6
Spawn 0 0 -2.7
Spawn 1 0 -2.5
Spawn 0 0 2.5
Spawn 1 0 2.7
Spawn 0 -5.3 -0.1
Spawn 1 -5.3 0.1
Spawn 0 5.3 -0.1
Spawn 1 5.3 0.1
ForceFieldProjector -1 -0.485298 1.26451  1
ForceFieldProjector -1 0.485298 1.26451  1
ForceFieldProjector -1 -0.485298 -1.26451  1
ForceFieldProjector -1 0.485298 -1.26451  1
TestItem -4.8 0
TestItem 4.8 0
Turret -1 -2.70196 1.53956e-008  1
Spawn 0 -3 -0.1
Turret -1 2.70196 0  1
 


levelgen:
  Code:
local FlagStart = math.random(8)
if(FlagStart == 8) then
    levelgen:addLevelLine("FlagItem -1 0 -4.5  30")
elseif(FlagStart == 7) then
    levelgen:addLevelLine("FlagItem -1 8 0  30")
elseif(FlagStart == 6) then
    levelgen:addLevelLine("FlagItem -1 0 -3.5  30")
elseif(FlagStart == 5) then
    levelgen:addLevelLine("FlagItem -1 0 4.5  30")
elseif(FlagStart == 4) then
    levelgen:addLevelLine("FlagItem -1 0 3.5  30")
elseif(FlagStart == 3) then
    levelgen:addLevelLine("FlagItem -1 6.3 0  30")
elseif(FlagStart == 2) then
    levelgen:addLevelLine("FlagItem -1 -6.3 0  30")
else
    levelgen:addLevelLine("FlagItem -1 -8 0  30")
end