I'm trying to write a new class that I can drag from actor classes window into the scene and it will spawn a specific particle effect. Its going to be a 'prop' that later will also contain a static mesh and a point light. Maybe some defined variables that can be changed in the properties window. So far, I have the static mesh working using this code:
class LightFixture extends StaticMeshActor;
defaultproperties
{
Begin Object Class=StaticMeshComponent Name=myMesh
bAllowApproximateOcclusion=TRUE
bForceDirectLightMap=TRUE
bUsePrecomputedShadows=TRUE
StaticMesh=StaticMesh'props.Meshes.lamp'
End Object
Components.Add(myMesh)
}
now, I'd like to add a particle system (template?), and from what I'm learning, it's not as easy as adding the mesh. In a new class, I tried to add a particle effect this way:
class FireParticle extends EmitterPool
placeable;
var ParticleSystemComponent PSC;
defaultproperties
{
Begin Object Class=ParticleSystemComponent Name=myEffect
bAutoActivate=true
Template=ParticleSystem'props.FX.fire'
End Object
ParticleSystemComponent=myEffect
Components.Add(myEffect)
}
So that didn't work... I read somewhere that emitterpool was the way to spawn.. I am very new to scripting, if that isn't already obvious :)
thanks in advance, if anyone can help..