
Originally Posted by
Nebula
I'm sure this has an easy fix but I cant figure it out. Basically I want my compass to move to between 355 and 5 degrees (North,+- a bit). RandomRange doesn't work because It finds a number between 5 and 355, but since I'm using the compass it should reset to 0 at 360. Does anyone know of a fix to this? Thanks.
Simba Code:
MakeCompass(randomrange(355, 5));
Edit:
Could I just make a case statement like:
Case random(2) of
0: MakeCompass(randomrange(0, 5));
1: MakeCompass(randomrange(355, 359));
Simba Code:
MakeCompass(randomrange(355, 5));
This would be the random range of 355 and 5, which means all numbers from 355 till to 5, i can be 215, it can be 100... etc etc.
Try this:
Simba Code:
MakeCompass(randomrange(-5, 5));
Not sure though if MakeCompass works with negative numbers.
Edit: also have you tried ClickNorth yet?