game_manager
{
spawn
{
wm_axis_respawntime 1
wm_allied_respawntime 1
wm_set_round_timelimit 25
}
}

endflag
{
trigger allied_capture
	{
	wait 1000
	wm_announce "^0>^7Final Flag Captured^0."
	wm_teamvoiceannounce 0 "allies_hq_objective_captured"
	wm_teamvoiceannounce 1 "allies_hq_objective_captured"
	wait 5000
	wm_setwinner 1
	wm_endround
	}

trigger axis_capture
	{
	wait 1000
	wm_announce "^0>^7Final Flag Captured^0."
	wm_teamvoiceannounce 0 "axis_hq_objective_captured"
	wm_teamvoiceannounce 1 "axis_hq_objective_captured"
	wait 5000
	wm_setwinner 0
	wm_endround
	}
}


elvator_button_up
{
	trigger elvator_button_up
	{
		trigger elvator move_up
	}
	trigger elvator_button_down
	{
		trigger elvator move_down
	}
}

elvator
{
	spawn
	{
		wait 100

		accum 1 set 1

		trigger elvator_door_left_top close
		trigger elvator_door_right_top close

		trigger elvator_door_left_buttom open
		trigger elvator_door_right_buttom open
	}
	trigger move_up
	{
		accum 1 abort_if_not_equal 1

		setstate elvator_trigger invisible
		wait 1000

		trigger elvator_door_left_buttom close
		trigger elvator_door_right_buttom close

		wait 1000

		playsound sound/movers/misc/garage_door_start_01.wav
		playsound sound/movers/misc/big_gate2.wav looping volume 500		
	
		gotomarker elvator_path1 150 wait

		stopsound
		playsound sound/movers/misc/garage_door_end_01.wav

		trigger elvator_door_left_top open
		trigger elvator_door_right_top open

		accum 1 set 0

		wait 1000
		setstate elvator_trigger_top default
	}
	trigger move_down
	{
		accum 1 abort_if_not_equal 0

		setstate elvator_trigger_top invisible
		wait 2000

		trigger elvator_door_left_top close
		trigger elvator_door_right_top close

		wait 1000

		playsound sound/movers/misc/garage_door_start_01.wav
		playsound sound/movers/misc/big_gate2.wav looping volume 500		
	
		gotomarker elvator_path2 250 wait

		stopsound
		playsound sound/movers/misc/garage_door_end_01.wav

		trigger elvator_door_left_buttom open
		trigger elvator_door_right_buttom open

		accum 1 set 1

		wait 1000
		setstate elvator_trigger default
	}
}

elvator_door_left_top
{
	spawn
	{
	wait 100
	}
	trigger open
	{
		faceangles 0 270 0 1000 30
	}
	trigger close
	{
		faceangles 0 0 0 1000 30
	}
}

elvator_door_right_top
{
	spawn
	{
	wait 100
	}
	trigger open
	{
		faceangles 0 90 0 1000 30
	}
	trigger close
	{
		faceangles 0 0 0 1000 30
	}
}

elvator_door_left_buttom
{
	spawn
	{
	wait 100
	}
	trigger open
	{
		faceangles 0 270 0 1000 30
	}
	trigger close
	{
		faceangles 0 0 0 1000 30
	}
}

elvator_door_right_buttom
{
	spawn
	{
	wait 100
	}
	trigger open
	{
		faceangles 0 90 0 1000 30
	}
	trigger close
	{
		faceangles 0 0 0 1000 30
	}
}

/////////////////////////////////////////////
/////////////////// CAGE //////////////
///////////////////////////////////////////

cage_button_up
{
	trigger cage_button_up
	{
		trigger cage move_up
	}
	trigger cage_button_down
	{
		trigger cage move_down
	}
}

cage
{
	spawn
	{

		accum 1 set 1

	}
	trigger move_up
	{
		accum 1 abort_if_not_equal 1


		playsound sound/movers/misc/garage_door_start_01.wav
		playsound sound/movers/misc/big_gate2.wav looping volume 500		
	
		gotomarker cage_path1 200 wait

		stopsound
		playsound sound/movers/misc/garage_door_end_01.wav


		accum 1 set 0


	}
	trigger move_down
	{
		accum 1 abort_if_not_equal 0


		playsound sound/movers/misc/garage_door_start_01.wav
		playsound sound/movers/misc/big_gate2.wav looping volume 500		
	
		gotomarker cage_path2 200 wait

		stopsound
		playsound sound/movers/misc/garage_door_end_01.wav


		accum 1 set 1


	}
}