SRL Archive - Help

MakeCompass broken?


shnk

2011-12-30 21:54:33

Idk im not sure but when i do
Makecompass ('w');
it keeps rotating and doesn't stop

[Nathan]

2011-12-30 21:58:51

I am using it in a script that is running now… Try this:
MakeCompass(randomrange(265,275));

shnk

2011-12-30 22:09:53

err tried that it keeps rotating

Gushers

2011-12-31 01:29:38

Maybe you have it in the wrong part of the script and also make it a W not a w.

P1nky

2011-12-31 01:30:40

Post your function, that'll help us to solve your problem mate.

RISK

2011-12-31 01:31:38

It wouldn't matter if the "W" was capped or not, Gushers. :)
case LowerCase(Direction) of
'n': DirectionDeg := 0;
'w': DirectionDeg := 270;
's': DirectionDeg := 180;
'e': DirectionDeg := 90;
'random', 'rand': DirectionDeg := RandomRange(0, 360);
end;

The "Lowercase(Direction)" will make sure no matter if the 'W' is capped or not, it will be recognized.