challenge GAME_OVER
begin script GameOver
	TemplePos = 0
	Temple = 0
	Wait = 0
	StartPos = 0
	ZoomPos = 0
start
	fade all draw text time 1 seconds					
	TemplePos = marker at player 1 temple position
	StartPos= marker at player 1 temple entrance position radius 90 height 40
	ZoomPos	= marker at player 1 temple entrance position radius 50 height 10

	Temple = get CITADEL at [TemplePos] radius 40

	begin cinema
		start music MUSIC_TYPE_SCRIPT_FAILURE
		move game time  23.00 time 10
		
		shake camera at [TemplePos] radius 200.0 amplitude 0.1 time 1

		set camera position to [StartPos] //start pos
		//set camera position to [TemplePos] + [ -90,40,90] //start pos
		set camera focus to [TemplePos] + [0,10,0]
		wait until camera ready
		
  		move camera position to [ZoomPos] time 12 // end of initial camera zoom
		move camera focus to [TemplePos] + [0,5,0] time 12
		
		//delete Temple with temple explode

 
		shake camera at [TemplePos] radius 100.0 amplitude 0.5 time 2

		start say sound HELP_TEXT_NEW_L5_INTRO_12	//laugh

		wait until camera ready

		set camera position to [TemplePos] + [ 40,15,-20] //2 pos
		move camera position to [TemplePos] + [ 42,16,-22] time 3

		eject evil spirit //evil arrives

		say single line HELP_TEXT_NEW_DEVELOPMENT_STAGE_MEET_GUIDE_05 //we're all dead

		set camera position to [TemplePos] + [ -30,20,25] //3 pos
		move camera position to [TemplePos] + [ -31,21,24] time 2

		eject good spirit //good arrives
		
		shake camera at [TemplePos] radius 500.0 amplitude 0.25 time 1
		//wait until read
		//start say sound HELP_TEXT_NEW_L5_INTRO_12	//laugh

		set camera position to [TemplePos] + [ -20,30,35] //4 pos

		shake camera at [TemplePos] radius 100.0 amplitude 0.5 time 2

		move camera position to [TemplePos] + [ -21,31,35.5] time 1
 
		wait until read
		say single line HELP_TEXT_MISSIONARIES_17  //I hate long goodbyes 

		set camera position to [TemplePos] + [ 30,40,-20] //5 pos
		wait 0.5 seconds

		shake camera at [TemplePos] radius 800.0 amplitude 0.5 time 16

		set camera position to [TemplePos] + [ 15,50,20] //6 pos
		wait 0.5 seconds



		set camera position to [TemplePos] + [ -10,60,25] //7 pos
		wait 0.5 seconds

		set camera position to [TemplePos] + [ 20,70,9] //8 pos
		wait 0.5 seconds

		make good spirit disappear //good leaves

		start sound LH_SAMPLE_G_CITADELEXPLODE_01
		set fade red 0 green 0 blue 0 time 12

		make evil spirit disappear //evil leaves 

		set draw text colour red 255 green 255 blue 255
		draw text HELP_TEXT_GAME_OVER across 0.25 down 0.45 width 0.5 height 0.1 size 0.075 fade in time 3 seconds

		set camera position to [TemplePos] + [ 10,80,-15] //9 pos

		wait 0.5 seconds
 		start sound LH_SAMPLE_G_CITADELEXPLODE_01
		set camera position to [TemplePos] + [ -13,90,5] //10 pos
		wait 0.5 seconds
		//start say sound HELP_TEXT_NEW_L5_INTRO_12	//laugh
		move camera position to [TemplePos] + [ 14,1000,-24] time 12//out pos
		//wait until camera ready
		//wait 
		//wait until fade ready
		//set clipping window across 0 down 0 width 0.0001 height 0.0001 time 0.1
		wait until read
		//wait until fade ready
		disable game time
		wait 2 seconds
		//wait 0.2 seconds
		fade all draw text time 5 seconds					
		wait 2 seconds
		
		wait until fade ready
		run SCRIPT_DEV_FUNCTION_ENTER_SAVEGAMEROOM developer function	
		stop music
	end cinema
end script GameOver
	