// TheCave script file LAST MAN STANDING!
// So you have intress about my 1024^3 competition map
// Please take a look I do not mind.
// game manager starts here
game_manager
{

	// Initialising

	// When game starts
	spawn
	{
		// Level initialisation
		remapshaderflush
		// Game rules
		wm_number_of_objectives 1
		wm_set_round_timelimit	5
		wait 50
		// Set all the non-LMS entities invisible
		setstate construction_materials invisible
		setstate construction_materials2 invisible
		setstate construction_toi invisible
		setstate cust_toi invisible
		setstate cust_toi2 invisible						
		setstate ladlms default 
		trigger water1 reset								
		
	}
	
	trigger allies_win
	{
		wm_setwinner	1			
		
		wm_endround
	}
	

	
	
}

// Allied bridge!
construction_script
{
   spawn
	{
		wait 500
		remove
	}

   
}

// Axis pump generator
construction_script2
{
   spawn
	{
		wait 500
		remove
	}

   

}


// water
water1
{
	trigger up
	{
		enablespeaker water1
		enablespeaker water2
		gotomarker wup 6 
		trigger water2 up		
	}

	trigger down
	{
		gotomarker middle 6 wait 	
		gotomarker wdown 6 	
		trigger water2 down	
	}

	trigger reset
	{
		gotomarker wdown 900 
		trigger water2 reset		
	}
}

// water2 controlled by water 1 do not touch!!
water2
{
	trigger up
	{
		gotomarker wup2 6 	
	}

	trigger down
	{
		gotomarker wdown2 6 wait
		disablespeaker water1 
		disablespeaker water2 	
	}

	trigger reset
	{
		gotomarker wdown2 900 	
	}
}

allied_win
{
	
	spawn
	{
		wait 500
		remove
	}	

	trigger allied_win
	{
		wait 500
	}	
}

// Opens door switch!
opdoor
{

	spawn
	{
		wait 500
		remove
	}

	trigger opdoor
	{
		wait 500
	}	
}

// the final door
door
{
	spawn
	{
		wait 500
		remove
	}
	
	
}

// lever controlled by door do not touch!!
lever
{
	spawn
	{
		wait 500
		remove
	}
	
}

ladlms
{
	spawn
	{
		wait 200		
		
	}
}

ladlms2
{
	spawn
	{
		wait 200		
		
	}
}


