I think I understand what you want to do.
You want basically pick the soldier that possess the crosshair
You can do that quite simply like that :
create two instance variable for the crosshair object:
- soldierUID type number default 0
- firing type bolean default false
Global variable crossDist = 100 // Distance between soldier and crosshair
System: On start of layout
-> destroy crosshair
System: Foreach Soldier
-> System: create crosshair on layer 0 at cos(soldier.angle)*crossDist,sin(sodlier.angle)*crossDist
-> crosshair: pin to Soldier
-> crosshair: set sodlierUID to Soldier.UID
System: Every tick
-> crosshair: set firing to false
crosshair: is overlapping Soldier
-> crosshair: set firing to true
crosshair: is firing
soldier: pick instance with UID crosshair.soldierUID
-> Sodlier: spawn Bullet
-> Bullet: set angle to Soldier.angle