
class BandagesSmallPack extends TournamentPickUp;

#exec mesh import mesh=BandageSmall anivfile=Models\BandageSmall_a.3d datafile=Models\BandageSmall_d.3d x=0 y=0 z=0 mlod=0
#exec mesh origin mesh=BandageSmall x=0 y=0 z=0
#exec mesh sequence mesh=BandageSmall seq=All startframe=0 numframes=1

#exec meshmap new meshmap=BandageSmall mesh=BandageSmall
#exec meshmap scale meshmap=BandageSmall x=0.01953 y=0.01953 z=0.03906

#exec TEXTURE IMPORT NAME=BandageFront FILE=Textures\BandageFront.BMP GROUP=Skins

#exec AUDIO IMPORT FILE="Sounds\bandageopen.WAV" NAME="bandageopen"

var() int HealingAmount;

state Activated
{
   function endstate()
   {
      bActive = false;
      SetTimer(0.0, False);
   }

   function Timer()
   {
      local int HealMax;
      local Pawn P;

		if (Charge>0)
      	Charge -= 1;
		if (Charge<=0)
         UsedUp();
		if (Owner != none)
		{
      	P = Pawn(Owner);
      	HealMax = P.default.health;
      	if (P.Health < HealMax)
      	{
         	P.Health += HealingAmount;
         	if (P.Health > HealMax)
					P.Health = HealMax;
      	}
   	}
   }
   function BeginState()
   {
      bActive = true;
      PlaySound(ActivateSound,,4.0);
      SetTimer(1.0,True);
   }
}

state DeActivated
{
Begin:
}

defaultproperties
{
	bCanHaveMultipleCopies=false
	Physics=PHYS_Falling
	MultiSkins(0)=Texture'BandageFront'
	HealingAmount=1
   ExpireMessage="Bandages used up"
   bAutoActivate=True
   bActivatable=True
   PickupMessage="You got some bandages"
   ItemName="Bandages"
   Charge=10
   MaxDesireability=1.200000
   ActivateSound=none
   bRotatingPickup=False
	DrawType=DT_Mesh
	Mesh=Mesh'BandageSmall'
   RespawnTime=120.00
   PickupViewMesh=Mesh'BandageSmall'
   PickupSound=Sound'bandageopen'
	CollisionRadius=20.0
	CollisionHeight=4.0
	RemoteRole=ROLE_DumbProxy
}

