//==========================================================================================
//
//	heli_m1.gm
//
//	Who  	When		What
//------------------------------------------------------------------------------------------
//	^4Tardis	07 June 2014	Initial Script
//
//==========================================================================================
//

global Map =
{
	Debug = 0, // please set to zero before distributing your script
	FlagStatus = 0, //no team owns it initially


	minicp_Built = function( trigger )
	{
		Util.MapDebugPrint( "minicp_Built" );
	},

	Documents_Fence_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Documents_Fence_Destroyed" );
	},

	minicp_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "minicp_Destroyed" );
	},

	access_codes_Taken = function( trigger )
	{
		Util.MapDebugPrint( "access_codes_Taken" );
	},

	access_codes_Returned = function( trigger )
	{
		Util.MapDebugPrint( "access_codes_Returned" );
	},

	access_codes_Secured = function( trigger )
	{
		Util.MapDebugPrint( "access_codes_Secured" );
	},

	castletop_flag_Axis_Captured = function( trigger )
	{
		Map.FlagStatus = 1;

		Util.MapDebugPrint( "castletop_flag_Axis_Captured" );
	},

	castletop_flag_Allies_Captured = function( trigger )
	{
		Map.FlagStatus = 2;
		Util.MapDebugPrint( "castletop_flag_Allies_Captured" );
	},

	heliport = function( trigger )
	{
		Util.DisableGoal( "CHECKPOINT.*" );
		Util.MapDebugPrint( "heliport time_is_up" );
	},
};

global OnMapLoad = function()
{
	OnTrigger( "The allies CP has been constructed!", Map.minicp_Built );
	OnTrigger( "Document fence is destroyed!", Map.Documents_Fence_Destroyed );
	OnTrigger( "The allies CP has been destroyed!", Map.minicp_Destroyed );
	OnTrigger( "The Allies have stolen Documents", Map.access_codes_Taken );
	OnTrigger( "The Axis have retrieved Documents", Map.access_codes_Returned );
	OnTrigger( "Allies win!", Map.access_codes_Secured );
	OnTrigger( "Axis Have Control of the Heliport Flag!", Map.castletop_flag_Axis_Captured );
	OnTrigger( "Allies Have Taken The Control of the Heliport!", Map.castletop_flag_Allies_Captured );
	OnTrigger( "Allies captured the Heliport^1!!", Map.heliport );

	Util.DisableGoal( "MOUNTMG42_.*" );

	Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." );
};

global OnBotJoin = function( bot )
{
	bot.TargetBreakableDist = 90.0;
};
