game_manager
{
spawn
{
wait 300
wm_axis_respawntime	1
wm_allied_respawntime	1
wm_set_round_timelimit	90
wm_setwinner -1
}
}


flag1
{
spawn
{
}
trigger allied_capture
{
wm_announce "^nThe allies know how to capture a flag, good!"
setautospawn "Gamma I" 1
}
}


flag2
{
spawn
{
}
trigger allied_capture
{
wm_announce "^nThe allies are improving!"
setautospawn "Gamma II" 1
}
}



flag3
{
spawn
{
}
trigger allied_capture
{
wm_announce "^nThe allies have reached the final stage!"
setautospawn "Gamma III" 1
}
}

jumptimer_start_1
{
spawn
{
accum 0 set 0			//key is not pressed yet
}
trigger start
{
accum 0 abort_if_not_equal 0		//only start if key isn't pressed yet
accum 0 set 1				//key is pressed
enablespeaker timer_1_switch
wm_announce "^1Get ready^w!"
wait 1000
enablespeaker timer_1_select
wm_announce "^w3"
wait 300
enablespeaker timer_1_select
wait 700
enablespeaker timer_1_select
wm_announce "^w2"
wait 300
enablespeaker timer_1_select
wait 700
enablespeaker timer_1_select
wm_announce "^w1"
wait 300
enablespeaker timer_1_select
wait 700
wm_announce "^1GO^w!"
trigger gate_1 open			//open gate 1
trigger gate_2 open			//open gate 2
trigger timedteleporter_1 disable	//disable teleporter
}
trigger end
{
accum 0 set 0				//key is pressable again
}
}

gate_1
{
spawn
{
wait 200
accum 0 set 0			//closed
gotomarker gate_1_down 10000	//ensure the gate is closed
}
trigger open
{
playsound sound/movers/motors/motor_loop_02.wav looping volume 250
gotomarker gate_1_up 256 wait						//gate opens
stopsound
playsound sound/movers/misc/big_gate3.wav volume 250
wait 2000
trigger self close
}
trigger close
{
playsound sound/movers/motors/motor_loop_02.wav looping volume 250
gotomarker gate_1_down 256 wait						//gate closes
stopsound
playsound sound/movers/misc/big_gate3.wav volume 250
}
}

gate_2
{
spawn
{
wait 200
accum 0 set 0			//closed
gotomarker gate_2_down 10000	//ensure the gate is closed
}
trigger open
{
playsound sound/movers/motors/motor_loop_03.wav looping volume 250
gotomarker gate_2_up 128 wait						//gate opens
stopsound
playsound sound/movers/misc/big_gate3.wav volume 250
wait 1000
trigger self close
}
trigger close
{
playsound sound/movers/motors/motor_loop_03.wav looping volume 250
gotomarker gate_2_down 20 wait						//gate closes (speed = 20)
stopsound
playsound sound/movers/misc/big_gate3.wav volume 250
trigger timedteleporter_1 enable					//enable teleporter
}
}

timedteleporter_1
{
spawn
{
setstate timedteleporter_1 default				//enable teleporter at start
}
trigger disable
{
setstate timedteleporter_1 invisible				//disable teleporter
}
trigger enable
{
wait 1000
setstate timedteleporter_1 default				//enable teleporter
trigger jumptimer_start_1 end
}
}




