Limiting input controls

I am currently trying to get a crane on a boat operational, I am using numpad inputs to control the crane and so far i have managed to get every moving part to move as it should, however everypart is able to do a 360, I need a way to limit the amount parts can rotate or move through an axix and i am having a hard time achieving this as i am quite new

You need to learn/refresh vector math.
Then calculate difference in degrees between boat forward vector and crane forward vector (hint: use dot product).
Then use branch to cut off steering.

I was able to solve my issue using this setup