you can use containers if each turret is unique, but if you have lets say 4 turrets that are all the "same" sprite, as in a single object type containers may not be the best way. you'll have to give each ship an id, and then give the turrets two variables, one for their ID, and one for their ship ID. using events youll have to make a
for each ship
turrets variable 'ship id'=ships('ID')
-ACTION: TURRET SET POSITION TO SHIP, IMAGE POINT = ('TURRET POS ID')
you could try it with or without the for each, not sure if it'll make a difference, but sometimes it does depending on what your doing.
so for each ship, lets say if they had 4 turrets, you'd have 4 turret objects that youd need to create, and give them each the same 'SHIP ID' when you spawn them (you would do this at the start of the layout, or when you spawn a ship by creating 4 instances and giving them their given ships id as 'SHIP ID'), and then numbering them 1 2 3 4 for their TURRET POS ID. that variable would tell each turret what exactly they are on their given ship. of course if you were to follow everything i said youd need to give the ship 4 image points. i realize this is a little confusing to describe in words, so if you have any trouble just reply :D