{
	saved_FirstTime[0]

	BlowFlak[( which )
	{
		player = Level.GetPlayer();
		flak = Level.GetEntity(which);
		flak.SetUsable( false );

		xPos = flak.GetPositionX();
		yPos = flak.GetPositionY();
		flak.DoFireExplosionEffect();
		flak.PlaySound(3);
		flak.SetModel(48);

		player.DamageHere(xPos, yPos, 3000, 8);
		player.ShakeHere(xPos, yPos );
	}]

	BlowTank[()
	{
		player = Level.GetPlayer();
		tank = Level.GetEntity("grtank");
		tank.SetDead(true);

		xPos = tank.GetPositionX();
		yPos = tank.GetPositionY();
		tank.DoFireExplosionEffect();
		tank.PlaySound(3);
		tank.SetModel(35);

		player.DamageHere(xPos, yPos, 3000, 8);
		player.ShakeHere(xPos, yPos );
	}]

	EnableCharge[ (which)
	{
		chg = Level.GetEntity(which);

		chg.ShowEntity(true);
		chg.SetUsable(true);
		chg.SetUseText(120);
		chg.SetSkin(1);
	}]

	Init[ ()
	{
		if(saved_FirstTime=0)
		{
			saved_FirstTime=1;
			if( (GetID()="chg01") or (GetID()="tcharg") )
			{
				SetSkin(1);
				SetUsable( true );
				SetUseText(120);
			}else{
				ShowEntity(false);
				SetSkin(0);
				SetUsable( false );
			}
		}
	}]

	OnUse[ ()
	{
		SetSkin(0);
		PlaySound(20);
		SetUsable(false);

		charge = GetID();
		if( charge = "chg01" ){	Delay(4,1); }
		if( charge = "chg02" ){	Delay(4,2); }
		if( charge = "chg03" ){	Delay(4,3); }
		if( charge = "chg04" ){	Delay(4,4); }
		if( charge = "chg05" ){	Delay(4,5); }
		if( charge = "chg06" ){	Delay(4,6); }
		if( charge = "tcharg"){ Delay(4,7); }
	}]

	DelayReached[ (dy)
	{
		if( dy=1 ){ BlowFlak("flak01"); EnableCharge("chg02"); }
		if( dy=2 )
		{
			BlowFlak("flak02");
			EnableCharge("chg03");
			DestroyObject(Level.GetEntity("block1a"));
			DestroyObject(Level.GetEntity("block1b"));

			// fun collision hack because destroying the blockade
			// does not remove the collision for those occupied cells
			Level.SetCellBlocking(46,87,0);
			Level.SetCellBlocking(45,88,0);
			Level.SetCellBlocking(46,88,0);
			Level.SetCellBlocking(46,89,0);
			Level.SetCellBlocking(47,89,0);
			Level.SetCellBlocking(47,90,0);
			Level.SetCellBlocking(48,90,0);
			Level.SetCellBlocking(48,91,0);
			Level.SetCellBlocking(49,91,0);

			dude = Level.GetEntity("scott01");
			dude.SetNationality(1);
			dude.GoPatrol();

			chum = Level.GetEntity("buddy4");
			chum.StopFollowingPath();
			chum.ClearQueuedPaths();
			Level.GetEntity("buddy4").GoPath("BuddyPath6",0,0);
		}
		if( dy=3 ){ BlowFlak("flak03"); EnableCharge("chg04"); }
		if( dy=4 ){ BlowFlak("flak04"); EnableCharge("chg05"); }
		if( dy=5 ){ BlowFlak("flak05"); EnableCharge("chg06"); }
		if( dy=6 )
		{
			BlowFlak("flak06");
			DestroyObject(Level.GetEntity("block2a"));
			DestroyObject(Level.GetEntity("block2b"));

			// fun collision hack because destroying the blockade
			// does not remove the collision for those occupied cells
			for i=82 to 88
			{
				Level.SetCellBlocking(79, i, 0);
			}
		}

		if( dy=7 )
		{
			BlowTank();
		}else{
			Level.AdvanceObjectives(1);
			if( Level.saved_CurObjective > 5 )
			{
				Level.AdvanceObjectives(0);
			}
		}

		ShowEntity(false);
	}]
}