my enemies consist of a 'base' and a 'turret', each sorted into respective families.
Both go through a set of states to define their behaviours. Base and turret are grouped through containers and pinned together.
My bases work quite well, but ironicly the simpler turrets cause trouble.
They should all be firing individually at their own pace, creating different types of projectiles.
But atm projectiles are spawned either from only a single turret instance or all instances at once.
For state transitions a variable in the enemy types defines which state to go to upon exiting a given state.
This is the main state loop of the turrets:
This is one of the weapon types:
I'm having trouble understanding what referencing functions need, I tried lots of variants but i get either only a single turret instance to shot or all instances firing at once.
Can anyone point me to the glaring mistake(s) I'm making?