You need to calculate turret positions based on the ship direction. Actually it's not that hard, but you need to use some trigonometry.

How? You can calculate a point in the circle with a simple formula. x position of the point = cos (angle to the point) * radius (distance to the point). y position of the point = sin (same angle) * radius (same distance).

So, you need to know angle to the point and distance to the point. Distance should be the same as the original distance and you can calculate original distance by using a^{2} + b^{2 }= c^{2}. Meaning - distance on x axis^{2} + distance on y axis ^{2} = real distance. In stencyl it looks like this:

sqrt[x_distance^2 + y_distance^2]

How to calculate the angle? You need to calculate original angle then add ship's direction to it. To find original angle use atan2 block (atan2[y_distance, x_distance]). When you add direction, remember to transform direction to radians (use block "as radians"), because sin/cos blocks takes radians, not degrees and also atan2 block gives radians, not degrees, however direction block gives degrees, not radians.

x_distance and y_ distance should be x and y distance from the ship center to the turret center. All those calculations will give you x_center and y_center of the turret, so you need to diminish half-width to x and half_height to y to get x/y position.