Nava2
2008-05-22 20:27:30
Now, firstly, I haven't tested this. It was merely an idea, and I ran with it.
The concept is this:
If you set up ALL of your scripts with your radial walks at north then your script must always be facing north which could lead to detectability while walking. With this version of RadialWalk, it SHOULD right your compass for the script, but not on RS. This being said, it should walk as if the compass is north while it is at any degrees that the writer has made it be.
After that shpiel, here is the function:
*Edit: Changed CompassAngle to CA; and changed the rs_GetCompassAngle to add Degrees. Thanks Bob.
I know this compiles but please let me know if it works ;)
Nava2
The concept is this:
If you set up ALL of your scripts with your radial walks at north then your script must always be facing north which could lead to detectability while walking. With this version of RadialWalk, it SHOULD right your compass for the script, but not on RS. This being said, it should walk as if the compass is north while it is at any degrees that the writer has made it be.
After that shpiel, here is the function:
*Edit: Changed CompassAngle to CA; and changed the rs_GetCompassAngle to add Degrees. Thanks Bob.
{Edited from RadialWalk, by Nava2 to include Independent Compass!}
function RadialWalkIC(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
var CA, NewStart, NewEnd: integer;
tpa: TPointArray;
i: Integer
begin
Result := False;
CA := Round(rs_GetCompassAngleDegrees);
if not (InRange(CA, 0, 5) or InRange(CA, 355, 360)) then
begin
NewStart := StartRadial - CA;
NewEnd := EndRadial - CA;
end else
begin
NewStart := StartRadial;
NewEnd := EndRadial;
end;
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, 0, NewStart, NewEnd, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
FFlag(10);
Result := True;
Break;
end;
end;I know this compiles but please let me know if it works ;)
Nava2