//=============================================================================
// ShakeTrigger.
//=============================================================================
class JailTimerTrigger extends Trigger;

var(events) Name CellName;
var bool bInUse;
var deusexplayer player;

function Trigger(Actor Other, Pawn Instigator)
{
	
}

function Touch(Actor Other)
{
	local DeusExPlayer player;
	local JailTimer JT;

	if (bInUse)
		return;

	if (other.IsA('DeusExPlayer'))
	{
		player = DeusExPlayer(Other);
		player.ClientMessage("You are detained for 60 seconds!");

		foreach Allactors (class'JailTimer', JT)
		{
			if(JT.DoorName == CellName)
			{
				JT.LetsGo();
				SetTimer(72, False);
				bInUse = True;
			}
		}
		Super.Touch(Other);
	}
}

function Timer()
{
	bInUse = False;
}

defaultproperties
{

}
