I'm trying to create an object that I call EnemyFactory. This object, as the name suggests, is used to spawn enemies in my game.

What I'm trying to do is to have duplicates of the object in the level which all behave in the same way, so that if I change one's properties, that changes all of them.

This is the problem: I have an event which causes them to spawn enemies. It fires off...

>> Every 3 seconds
>> When no enemies are intersecting the spawner
>> 3 out of 9 chance

When I run it, it works, but every spawner in the level does the same thing - i.e. for the probability bit, they either ALL spawn or NONE spawn.

If I clone the object, then this works - but obviously then I have 20 or so independent objects in the level, and if I mage changes, I have to change all of them manually.

I assume there is some way to deal with this, and I suspect that it uses the On Each Object loop, but I've tried to do this and it doesn't work (the loop condition never seems to be true).

Can anyone help me with this?