> Aphrodite,
>
> Just thinking out loud: Wouldn't using startangle+degrees for max and startangle-degrees for min solve that issue?
>
Not sure, since I think C2's angle logic passes from 0 to 350 and not to -10 for exemple (not 100% sure about that), so if you clamp it to -10, it'll never clamp it
However, by using angle() I think you should be able to go through:
I suggest using a function with One parameter:
On call Function "Normal_Angle" : Set return value to Angle(0, 0, cos(Function.Param(0), sin(Function.Param(0))
Set angle to : clamp(Function.Call("Normal_Angle", Self.Angle), Function.Call("Normal_Angle", Min_Angle), Function.Call("Normal_Angle", Max_Angle))
Where Min_angle and Max_Angle are the limit angles, that should work even if C2 changes it's way to interpret angles I think, not tested
Yeah, guess you're right. I believe last time I tried something with clamp and angle I made sure that in the calculation the startangle was considered to be 180 and did the calculation from that, so the clamp would always be returned between 0 and 360. And calculating it back to the desired ingame angle.
I've been out of C2 for a while, so stepping back on the bicycle ..