I'm trying to make a rotating sprite (controlled with left and right key) which would have it's rotating angle (max degrees to left & right) limited/clamped by the set variable values. I thought this was going to be a quick task but I've only managed to have one of the limited directions working, this seems to be due to going from negative to positive angle value or vice versa, but I'm having a hard time thinking how to solve it:/ Can anyone spot what's the issue with the events and how it could be fixed?
C3 file:
https://www.dropbox.com/s/9uvwp7rfztj0jsc/rotator_angle_problem_v2.c3p?dl=0