The source code says that if ThingFactory is untouched, it goes to state 'Waiting'. If a previously spawned prototype raises its event then, the ThingFactory does not update its 'numitems', but sends itself to state 'Spawning'. There the ThingFactory does nothing if numitems >= maxitems.
I added the decrement to ThingFactory.Waiting.Trigger():
Code: Select all
Auto State Waiting {
function Trigger( actor Other, pawn EventInstigator ) {
//only if Other is from this factory
if ( Other.class == prototype )
numitems--;
Super.Trigger(Other, EventInstigator);
}
}