SRL Archive - SRL Suggestions

anyone think of a use for this


Bobzilla69

2010-09-11 16:07:12

hey,

i needed a change to the RadialWalk/RadialRoadWalk and so on, it was simple i wanted it to check multiple distances before saying it didnt the color.

so this is what i came up with.


Function RadialWalkDistance(startDist, col, sRadial, eRadial, maxdist, xMOD, yMOD, incBy:Integer):Boolean; //example RadialWalkDistance(30, 11970028, 310, 375, 78, -1, -1, 4)
begin
repeat
wait(5); //aint tried removing just added in case
startDist:= + incBy;
until((startDist>maxdist)or(RadialWalk( col, sRadial, eRadial, maxdist, xMOD, yMOD)))
end;

So what this now allows me to do is set a minimum distance to start checking at and a maximum that it will work up to, you also have the ability to specify how large the increments are so that it can be more sensitive.

i am sure this can be improved and might not even need a function.

so whats your thought on this?

Naum

2010-09-11 16:14:46

Niels told me that LinearWalk did something like your suggestion.

Bobzilla69

2010-09-11 16:40:35

From: Naum
Niels told me that LinearWalk did something like your suggestion.


they all look to have a fixed distance, mine is kinda dynamic, so changes after it fails the first times untill it finds it withing the changing distances.

edit: spelling