yrex wrote:Okay, I've just found a better way. Unlike the previous one, it shouldn't cause slowdowns. Although there's a limit of number of gibs getting spawned during one frame.
Code: Select all
var Actor PendingActors;
var int PendingActorsCount;
simulated event Actor SpawnNotification(Actor A)
if(A.Class.Name == 'olCreatureChunks')
PendingActors[PendingActorsCount] = A;
function Tick(float deltaTime)
local int i;
local actor A;
A = PendingActors[i];
// Do stuff with A.
PendingActorsCount = 0;
I see two sections with '...' in your code above. I know the gib code should be copied in to one of those sections, but what is the other section for? I am just not sure what to replace the ... with. Maybe a quick note for me as to what goes there would be great. Thanks.