#include "scripts/common.txt"
#include "scripts/BP_common.txt"
#include "scripts/BP_MapCommon.txt"

//Tag IDs
//1000: Start Warp
//1001: 
//1002: 

bool exiting;
//------------------------------------------------------------------------------------------------------------------------
// Start Map
//------------------------------------------------------------------------------------------------------------------------
$script 0
{
	StartMap();
	exiting = false;
	Game.CallDelayedMapScript(1, instigator, 0); //Update Map
}
//------------------------------------------------------------------------------------------------------------------------
// Update Map
//------------------------------------------------------------------------------------------------------------------------
$script 1
{
	TickMap();
	$restart;
}
//------------------------------------------------------------------------------------------------------------------------
// On Portal To Freeze Weapon
//------------------------------------------------------------------------------------------------------------------------
$script 10000
{
	//has freeze gun
	if (!exiting && (instigator.Flags() & AF_ENTEREDAREAEVENT) == 0 && Player.HasWeapon(19))
	{
		exiting = true;
		delay(2.0f);
		PlayLoop.StartWarp(instigator, 1008, 121);
	}
}
//------------------------------------------------------------------------------------------------------------------------
