//=============================================================================
// ForceFieldProj.
//=============================================================================
class ForceFieldProj expands Projectile;

#exec AUDIO IMPORT FILE="Sounds\Pickups\FFIELDl2.WAV" NAME="ffieldl2" GROUP="Pickups"

#exec MESH IMPORT MESH=ForceField ANIVFILE=MODELS\forcef_a.3D DATAFILE=MODELS\forcef_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=ForceField X=0 Y=0 Z=0 YAW=64
#exec MESH SEQUENCE MESH=ForceField SEQ=All STARTFRAME=0  NUMFRAMES=19
#exec MESH SEQUENCE MESH=ForceField SEQ=Grow STARTFRAME=0  NUMFRAMES=10
#exec MESH SEQUENCE MESH=ForceField SEQ=Spin STARTFRAME=10  NUMFRAMES=9
#exec OBJ LOAD FILE=Textures\fireeffect10.utx PACKAGE=UNREALI
#exec MESHMAP SCALE MESHMAP=ForceField X=0.08 Y=0.08 Z=0.16
#exec MESHMAP SETTEXTURE MESHMAP=ForceField NUM=1 TEXTURE=FireEffect10

var int Charge;

	function PreBeginPlay()
	{
		CallParent.PreBeginPlay();
		PlaySound(SpawnSound);
		SetCollision(True,True,True);
		PlayAnim('Grow',0.2);
		if (Charge<0) Charge = 10;
	}

Auto State Activated
{
	function Touch(Actor Other)
	{
		PlaySound(ImpactSound);	
	}

Begin:
	FinishAnim();
	Sleep(Charge/10);
	TweenAnim('All',0.5);
	FinishAnim();
	Destroy();
}

