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:
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:
Is that a bug or am I missing something completly obvious?Code: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.leukocyte_extends' End Object Components.Add(ParticleSystemComponent1) bWakeOnLevelStart=true LifeTime=0; }
Edit:
Unchecking "Player Only" solved everything
greetings





Reply With Quote


Bookmarks