You're confusing the issue talking about 'just ones on P1'. P1 is the loop variable so takes on the value of all ships over the loops.
The reason you are getting all weapon mounts is that you are using each, which means 'loop through every weapon mount type'. So youre logic is saying 'find ship 2, then loop through every weapon mount, regardless of who it belongs to'.
The trouble is B3D has only 1 list for each type.. ideally you would like a separate list of weaponmounts belonging to each ship, right?
There are a few ways round this.
1)Each weapon mount has a field identifying the ship it belongs to.
2)Create separate weapon mount types, WeaponMounbt1, WeaponMount2 etc, one for each ship, thereby giving you more than 1 list.
3)Create arrays of weapon mounts for each ship, which store only the weapon mounts on that ship.
4)Implement your own lists enabling you to have 1 per ship.
The inherent '1 list per type' in B3D makes basic stuff simpler, but you're hitting the limitations of the language.
The reason you are getting all weapon mounts is that you are using each, which means 'loop through every weapon mount type'. So youre logic is saying 'find ship 2, then loop through every weapon mount, regardless of who it belongs to'.
The trouble is B3D has only 1 list for each type.. ideally you would like a separate list of weaponmounts belonging to each ship, right?
There are a few ways round this.
1)Each weapon mount has a field identifying the ship it belongs to.
2)Create separate weapon mount types, WeaponMounbt1, WeaponMount2 etc, one for each ship, thereby giving you more than 1 list.
3)Create arrays of weapon mounts for each ship, which store only the weapon mounts on that ship.
4)Implement your own lists enabling you to have 1 per ship.
The inherent '1 list per type' in B3D makes basic stuff simpler, but you're hitting the limitations of the language.