I have 2 enemy sprite objects, both in the same family, sharing a number instance variable; 'Speed.' En_Red has a higher speed than En_Yellow.
On start of layout, System creates En_Red. On the next line, System creates En_Yellow.
I have a function created to fire a bullet, which creates the bullet object at enemyfamily.x, enemyfamily.y ...sort of.
I get enemyfamily to pick the instance with the lowest speed (which should be En_Yellow) and then run the bullet function.
Instead of the bullet originating at the enemy with the lowest speed, the bullet instead appears to be created at whichever 'create enemy' line happens to be above the other in the 'on start of layout' instruction.
Why does that happen?
If I add a 'set colour' instruction, I can confirm the family is indeed picking the instance with the least speed, yet the bullet still originates at the first enemy spawned in the layout, even if I swap the placement of the spawn lines back and forth.
I'm really just trying to get my head around picking a specific instance within a family and having a bullet function originate from the instance I'm picking, but, well, you know... I'm a noob.
Any help is appreciated, thanks folks.