FTC
02-10-2012, 11:24 AM
Hi,
I created a custom KActorSpawnable and use an Actor Factory in Kismet to create them. I want a fixed maximum amount of them in the level and create new ones when others are destroyed, so I created this Kismet setup:
http://img803.imageshack.us/img803/5411/kismet.png
To keep track of the currently existing actors I use an objectlist. The problem is that the destroyed event is never called when the kactors destroy after their ticks.
My Actor code is this:
class Leukocyte extends KActorSpawnable
placeable;
var float LifeTime;
function Tick(float DeltaTime)
{
super.Tick(DeltaTime);
LifeTime+=DeltaTime;
if(LifeTime>15)
{
Destroy();
}
}
DefaultProperties
{
Begin Object Name=StaticMeshComponent0
LightEnvironment=MyLightEnvironment
StaticMesh=StaticMesh'leukocyte.Mesh.leukocyte'
CastShadow=false
BlockRigidBody=true
CollideActors=true
End Object
CollisionType=COLLIDE_BlockAll
Begin Object Class=ParticleSystemComponent Name=ParticleSystemComponent1
Template=ParticleSystem'leukocyte.Effects.leukocyt e_extends'
End Object
Components.Add(ParticleSystemComponent1)
bWakeOnLevelStart=true
LifeTime=0;
}
Is that a bug or am I missing something completly obvious?
Edit:
http://desmond.imageshack.us/Himg141/scaled.php?server=141&filename=errorjr.jpg&res=medium
Unchecking "Player Only" solved everything
greetings
I created a custom KActorSpawnable and use an Actor Factory in Kismet to create them. I want a fixed maximum amount of them in the level and create new ones when others are destroyed, so I created this Kismet setup:
http://img803.imageshack.us/img803/5411/kismet.png
To keep track of the currently existing actors I use an objectlist. The problem is that the destroyed event is never called when the kactors destroy after their ticks.
My Actor code is this:
class Leukocyte extends KActorSpawnable
placeable;
var float LifeTime;
function Tick(float DeltaTime)
{
super.Tick(DeltaTime);
LifeTime+=DeltaTime;
if(LifeTime>15)
{
Destroy();
}
}
DefaultProperties
{
Begin Object Name=StaticMeshComponent0
LightEnvironment=MyLightEnvironment
StaticMesh=StaticMesh'leukocyte.Mesh.leukocyte'
CastShadow=false
BlockRigidBody=true
CollideActors=true
End Object
CollisionType=COLLIDE_BlockAll
Begin Object Class=ParticleSystemComponent Name=ParticleSystemComponent1
Template=ParticleSystem'leukocyte.Effects.leukocyt e_extends'
End Object
Components.Add(ParticleSystemComponent1)
bWakeOnLevelStart=true
LifeTime=0;
}
Is that a bug or am I missing something completly obvious?
Edit:
http://desmond.imageshack.us/Himg141/scaled.php?server=141&filename=errorjr.jpg&res=medium
Unchecking "Player Only" solved everything
greetings