class X_ParticleExplosion expands Effects;

#exec MESH IMPORT MESH=X_ParticleExplosion ANIVFILE=MODELS\X_ParticleExplosion_a.3d DATAFILE=MODELS\X_ParticleExplosion_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=X_ParticleExplosion STRENGTH=0
#exec MESH ORIGIN MESH=X_ParticleExplosion X=0 Y=0 Z=0

#exec MESH IMPORT MESH=X_ParticleExplosionB ANIVFILE=MODELS\X_ParticleExplosion_a.3d DATAFILE=MODELS\X_ParticleExplosion_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=X_ParticleExplosionB STRENGTH=0
#exec MESH ORIGIN MESH=X_ParticleExplosionB X=0 Y=0 Z=0

#exec MESH IMPORT MESH=X_ParticleExplosionC ANIVFILE=MODELS\X_ParticleExplosion_a.3d DATAFILE=MODELS\X_ParticleExplosion_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=X_ParticleExplosionC STRENGTH=0
#exec MESH ORIGIN MESH=X_ParticleExplosionC X=0 Y=0 Z=0

//------------------------------------------------------------------------

#exec MESH SEQUENCE MESH=X_ParticleExplosion SEQ=All STARTFRAME=0 NUMFRAMES=10
#exec MESH SEQUENCE MESH=X_ParticleExplosion SEQ=Little STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=X_ParticleExplosion SEQ=Explosion STARTFRAME=0 NUMFRAMES=10 RATE=10

#exec MESH SEQUENCE MESH=X_ParticleExplosionB SEQ=All STARTFRAME=0 NUMFRAMES=10
#exec MESH SEQUENCE MESH=X_ParticleExplosionB SEQ=Little STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=X_ParticleExplosionB SEQ=Explosion STARTFRAME=0 NUMFRAMES=10 RATE=10

#exec MESH SEQUENCE MESH=X_ParticleExplosionC SEQ=All STARTFRAME=0 NUMFRAMES=10
#exec MESH SEQUENCE MESH=X_ParticleExplosionC SEQ=Little STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=X_ParticleExplosionC SEQ=Explosion STARTFRAME=0 NUMFRAMES=10 RATE=10

//------------------------------------------------------------------------

#exec MESHMAP NEW MESHMAP=X_ParticleExplosion MESH=X_ParticleExplosion
#exec MESHMAP SCALE MESHMAP=X_ParticleExplosion X=1.0 Y=1.0 Z=2.0

#exec MESHMAP NEW MESHMAP=X_ParticleExplosionB MESH=X_ParticleExplosionB
#exec MESHMAP SCALE MESHMAP=X_ParticleExplosionB X=0.5 Y=0.5 Z=1.0

#exec MESHMAP NEW MESHMAP=X_ParticleExplosionC MESH=X_ParticleExplosionC
#exec MESHMAP SCALE MESHMAP=X_ParticleExplosionC X=0.25 Y=0.25 Z=0.5

//------------------------------------------------------------------------

#exec TEXTURE IMPORT NAME=BoltPartc01 FILE=CORONAS\BoltPartc01.bmp GROUP=Coronas FLAGS=2
#exec TEXTURE IMPORT NAME=BoltPartc02 FILE=CORONAS\BoltPartc02.bmp GROUP=Coronas FLAGS=2
#exec TEXTURE IMPORT NAME=BoltPartc03 FILE=CORONAS\BoltPartc03.bmp GROUP=Coronas FLAGS=2
#exec TEXTURE IMPORT NAME=BoltPartc04 FILE=CORONAS\BoltPartc04.bmp GROUP=Coronas FLAGS=2
#exec TEXTURE IMPORT NAME=BoltPartc05 FILE=CORONAS\BoltPartc05.bmp GROUP=Coronas FLAGS=2
#exec TEXTURE IMPORT NAME=BoltPartc06 FILE=CORONAS\BoltPartc06.bmp GROUP=Coronas FLAGS=2


var() texture PartcVariation[6];
var() float AnimSpeed;

simulated function PostBeginPlay()
{
local int i;

	PlayAnim('Explosion', AnimSpeed, 0.0);

	for (i=0; i<8; i++)
		MultiSkins[i] = PartcVariation[Min(5, Rand(6))];
	
}


simulated function Tick( float DeltaTime)
{
	ScaleGlow = LifeSpan * Default.ScaleGlow / Default.LifeSpan;
}

defaultproperties
{
	DrawType=DT_Mesh
	Mesh=X_ParticleExplosion
	bUnlit=True
	Style=STY_Translucent
	RemoteRole=ROLE_SimulatedProxy
	LifeSpan=2.000000
	ScaleGlow=2.000000
	bRandomFrame=True
	bParticles=True
	Texture=BoltPartc01
	DrawScale=0.100000
	PartcVariation(0)=BoltPartc01
	PartcVariation(1)=BoltPartc02
	PartcVariation(2)=BoltPartc03
	PartcVariation(3)=BoltPartc04
	PartcVariation(4)=BoltPartc05
	PartcVariation(5)=BoltPartc06
	MultiSkins(0)=BoltPartc01
	MultiSkins(1)=BoltPartc01
	MultiSkins(2)=BoltPartc01
	MultiSkins(3)=BoltPartc01
	MultiSkins(4)=BoltPartc01
	MultiSkins(5)=BoltPartc01
	MultiSkins(6)=BoltPartc01
	MultiSkins(7)=BoltPartc01
	AnimSpeed=0.500000
}
