{
	saved_FirstTime[1]
	Init[()
	{
		if(saved_FirstTime = 1)
		{
			if (GetID() = "charg_1")                
			{                                       
				SetUsable(true);                
				SetSkin(1);                     
				SetUseText(120);       
			}                                       
			if (GetID() = "charg_2")                
			{                                       
				SetUsable(true);                
				SetSkin(1);                     
				SetUseText(120);       
			}                                       
			if (GetID() = "charg_3")                
			{                                       
				SetUsable(true);                
				SetSkin(1);                     
				SetUseText(120);       
			}
			
			saved_FirstTime = 0;
		}
	}]
	
	DelayReached[(t)
	{
		xPos = self.GetPositionX();
		yPos = self.GetPositionY();

		if(t=1)
		{
			Panzer = Level.GetEntity("panzer1");
			Charg_1 = Level.GetEntity("charg_1");

			dude=Level.GetEntity("ppman1");
			if (dude != null)
			{
				cellX = xPos / 256;
				cellY = yPos / 256;
				dude.UnAttach(cellX,cellY);
			}

			Panzer.DoFireExplosionEffect();
			Panzer.SetModel(50);
			DestroyObject(Charg_1);
			Panzer.PlaySound(3);
			
			Level.GetEntity("foley").TaskMaster();

			Level.GetPlayer().DamageHere(xPos, yPos, 3000, 8 );
			Level.GetPlayer().ShakeHere(xPos, yPos );
		}
		if(t=2)
		{
			Panzer = Level.GetEntity("panzer2");
			Charg_2 = Level.GetEntity("charg_2");

			dude=Level.GetEntity("ppman2");
			if (dude != null)
			{
				cellX = xPos / 256;
				cellY = yPos / 256;
				dude.UnAttach(cellX,cellY);
			}

			Panzer.DoFireExplosionEffect();
			Panzer.SetModel(50);
			DestroyObject(Charg_2);
			Panzer.PlaySound(3);
			
			Level.GetEntity("foley").TaskMaster();

			Level.GetPlayer().DamageHere(xPos, yPos, 3000, 8 );
			Level.GetPlayer().ShakeHere(xPos, yPos );
		}
		if(t=3)
		{
			Panzer = Level.GetEntity("panzer3");
			Charg_1 = Level.GetEntity("charg_3");

			dude=Level.GetEntity("ppman3");
			if (dude != null)
			{
				cellX = xPos / 256;
				cellY = yPos / 256;
				dude.UnAttach(cellX,cellY);
			}

			Panzer.DoFireExplosionEffect();
			Panzer.SetModel(50);
			DestroyObject(Charg_1);
			Panzer.PlaySound(3);
			Level.GetEntity("foley").VicPath();
			Level.GetEntity("brock").VicPath();
			
			
			Level.GetEntity("foley").TaskMaster();
			Level.ObjectiveComplete(4);

			Level.GetPlayer().DamageHere(xPos, yPos, 3000, 8 );
			Level.GetPlayer().ShakeHere(xPos, yPos );
		}
	}]
	
	OnUse[(u)
	{
		if (GetID() = "charg_1")
		{
			SetUsable(false);
			SetSkin(0);
			PlaySound(20);
			Delay(4,1);
		}
		if (GetID() = "charg_2")
		{
			SetUsable(false);
			SetSkin(0);
			PlaySound(20);
			Delay(4,2);
		}
		if (GetID() = "charg_3")
		{
			SetUsable(false);
			SetSkin(0);
			PlaySound(20);
			Delay(4,3);
		}
	}]
}