footballjds
02-11-2008, 01:25 AM
Although it is over looked, in fact I’ve seen it in only one or two scripts. It IS very powerful, but I believe it wasn’t introduced very well. ;)
First I’ll tell you a little about it,
WalkPath(0); uses DDTM’s to search the minimap for the road you are looking for(path). It uses DDTM’s so you might think it is slow, actually it is quite fast. BECAUSE it only uses one color, the road color, the path color, or any other color. Thus making it practically instant, but VERY accurate.
First of all you might want to look at the path.scar file. It is in the misc includes.
The absolute first thing (after looking through the file), is to update it, yes srl devs are good, but they haven’t updated the path.scar and it won’t compile. Here is a working vers(I edited myself). // -------------------------------------------------------------------------- //
//-- Scar Standard Resource Library ------------ //
//-- » DDTM-Path Routines ------------ //
//--------------------------------------------------------------------------- //
// * Function SetPath(Number: Integer): Integer; //* by WT-Fakawi
// * Function WalkPath(ThePath: Integer): Boolean; //* by WT-Fakawi
// * Function FindPath(ThePath: Integer; Click: Boolean): Boolean; //* by WT-Fakawi
// * procedure PathRecorder(StartPath: Integer); //* by WT-Fakawi
// * File Edited by: Footballjds so that it compiles //*by Footballjds
{ type TDTMPoints;
Description: Define Path structure. One Main Point ( any color ) and upto 10 SubPoint of the SAME color. }
type
TDTMPoints = record
MainPoint: TPoint;
SubPoints: array[0..10] of TPoint;
end;
{ var Path: array[0..50] of TDTMPoints;
Description: Predefines Type array Path. }
var
Path: array[0..50] of TDTMPoints;
{
procedure SetupPaths;
begin
// YOUR PATHS IN HERE
end;
}
{************************************************* ******************************
function SetPath(Number: Integer): Integer;
By: WT-Fakawi
Description: Assembles DTM from Path. Inputs Path-Index, outputs DTM.
Usage: TheDTM := SetPath(0); or FindDTMRotated(SetPath(4).....
************************************************** *****************************}
function SetPath(Number: Integer): Integer;
var
DTMSubPoints: array of TDTMPointDef;
DTMMainPoint: TDTMPointDef;
TempTDTM: TDTM;
NrofSubPoints, i: Integer;
TheDTM: Integer;
begin
for i := 0 to 9 do // Calculate ArrayLength
if ((Path[Number].SubPoints[i].x = 0) and
(Path[Number].SubPoints[i].y = 0)) then
begin
NrofSubPoints := i;
Break;
end;
SetArrayLength(DTMSubPoints, NrofSubPoints);
DTMMainPoint.x := Path[Number].Mainpoint.x;
DTMMainPoint.y := Path[Number].Mainpoint.y;
DTMMainPoint.areasize := 1;
DTMMainPoint.areashape := 0;
DTMMainPoint.color := RoadColor;
DTMMainPoint.tolerance := 0;
for i := 0 to NrofSubPoints - 1 do
begin
DTMSubPoints[i].x := Path[Number].SubPoints[i].x;
DTMSubPoints[i].y := Path[Number].SubPoints[i].y;
DTMSubPoints[i].areasize := 1;
DTMSubPoints[i].areashape := 0;
DTMSubPoints[i].color := RoadColor;
DTMSubPoints[i].tolerance := 0;
end;
TempTDTM.MainPoint := DTMMainPoint;
TempTDTM.SubPoints := DTMSubPoints;
TheDTM := AddDTM(TempTDTM);
Result := TheDTM;
end;
{************************************************* ******************************
function WalkPath(ThePath: Integer): Boolean;
By: WT-Fakawi
Description: Simple Roadclicker, checks for RoadColor changes using CountFlag.
Returns False if Path not found.
Usage: WalkPath(1);
************************************************** *****************************}
function WalkPath(ThePath: Integer): Boolean;
var
WhichAngle: Extended;
TheDTM, x, y: Integer;
begin
TheDTM := SetPath(ThePath);
if FindDtmRotated(TheDTM, x, y, MMX1, MMY1, MMX2, MMY2, Radians(-35), Radians(35), 0.05,
WhichAngle) then
begin
FreeDTM(TheDTM);
Mouse(x, y, 0, 0, True);
Wait(1000);
FFlag(5);
Result := True;
end else FreeDTM(TheDTM);
end;
{************************************************* ******************************
function FindPath(ThePath: Integer; Click: Boolean): Boolean;
By: WT-Fakawi
Description: Returns True if Path was found.
Usage:
repeat
WalkPath(1);
until FindPath(2, True);
************************************************** *****************************}
function FindPath(ThePath: Integer; Click: Boolean): Boolean;
var
WhichAngle: Extended;
TheDTM, x, y: Integer;
begin
TheDTM := SetPath(ThePath);
if FindDtmRotated(TheDTM, x, y, MMX1, MMY1, MMX2, MMY2, Radians(-35), Radians(35), 0.05,
WhichAngle) then
begin
FreeDTM(TheDTM);
Result := True;
if Click then
begin
Mouse(x, y, 0, 0, True);
Wait(600);
FFlag(5);
end else MMouse(x, y, 0, 0);
end else FreeDTM(TheDTM);
end;
{************************************************* ******************************
procedure PathRecorder(StartPath: Integer);
By: WT-Fakawi
Description: Simple PathRecorder.
Usage: Enter StartPath.
- Click RightMouse Button for SubPoints
- Now hover Mouse over MainPoint and hit Q
- Copy Debug printout to your script.
- Choose Subpoints carefully. Upto 9 clicks are allowed,
but 4 Subpoints should well be sufficiant.
************************************************** *****************************}
procedure PathRecorder(StartPath: Integer);
var
i, CurrentPath, SubPointCounter, x, y: Integer;
begin
CurrentPath := StartPath;
repeat
Wait(100);
if IsMouseButtonDown(False) then
begin
GetMousePos(x, y);
Path[CurrentPath].SubPoints[SubPointCounter].x := x;
Path[CurrentPath].SubPoints[SubPointCounter].y := y;
repeat
until not IsMouseButtonDown(False);
SubPointCounter := SubPointCounter + 1;
end;
if IsKeyDown('q') then
begin
GetMousePos(x, y);
Path[CurrentPath].MainPoint.x := x;
Path[CurrentPath].MainPoint.y := y;
repeat
until not IsKeyDown('q');
writeln(' Path[' + IntToStr(CurrentPath) + '].Mainpoint.x:=' + IntToStr(Path[CurrentPath].MainPoint.x) + ';');
writeln(' Path[' + IntToStr(CurrentPath) + '].Mainpoint.y:=' + IntToStr(Path[CurrentPath].MainPoint.y) + ';');
for i := 0 to SubPointCounter - 1 do
begin
writeln(' Path[' + IntToStr(CurrentPath) + '].Subpoints[' + IntToStr(i) + '].x:=' + IntToStr(Path[CurrentPath].Subpoints[i].x) + ';');
writeln(' Path[' + IntToStr(CurrentPath) + '].Subpoints[' + IntToStr(i) + '].y:=' + IntToStr(Path[CurrentPath].Subpoints[i].y) + ';');
end;
SubPointCounter := 0;
CurrentPath := CurrentPath + 1;
end;
until False;
end;
Second somethings about WalkPath(0); the 0 is the array reference, you create the paths by using “PathRecorder(0);”. You can use this script below to create a path:
program New;
{.include srl/srl.scar}
{.include srl/srl/misc/path.scar}
begin
PathRecorder(0);
end.
Open up RS and find a road (any road, a path or a regular road), and run the script. To create the sub points, just right-click at every point. Then to print out the DTM-Array, move the mouse to the main point (where you want it to walk to). And hit “q”.
When it prints out stop the script and copy it (later on when your actually using this you can just go along and create more). Paste the new DDTM array that printed out and create a new script, you can use the one below, BUT you must replace the DDTM array with your own, here is the script:
program New;
{.include srl/srl.scar}
{.include srl/srl/misc/path.scar}
begin
RoadColor := {pick the color to put here};
Path[0].Mainpoint.x:=380;
Path[0].Mainpoint.y:=428;
Path[0].Subpoints[0].x:=380;
Path[0].Subpoints[0].y:=330;
Path[0].Subpoints[1].x:=370;
Path[0].Subpoints[1].y:=266;
Path[0].Subpoints[2].x:=628;
Path[0].Subpoints[2].y:=262;
Path[0].Subpoints[3].x:=456;
Path[0].Subpoints[3].y:=397;
Path[0].Subpoints[4].x:=381;
Path[0].Subpoints[4].y:=555;
Path[0].Subpoints[5].x:=280;
Path[0].Subpoints[5].y:=287;
Writeln(BoolToStr(FindPath(0, False)));
end.
Now go to where you were b4, run the script. If you have the road color right AND your in view of all the points it will find the spot and move the mouse there, it will also print out whether or not it found it.
A few things you must know:
Your road color must be right.
WalkPath looks for the road color so you must do: "RoadColor := clr";
even if the road color isn't a road thats fine.\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
You can only pick points on the path/road(or colors EXACTLY the same).
ALL POINTS MUST be the SAME color!
You CAN use FindRoadColor to set the road color, IE RoadColor := FindRoadColor.
{Note FindRoadColor doesn’t always work.}
Be sure to pick your points strategically;).
Below is a complete example including pictures and a script :D.
Here I am picking the colors:
http://aycu38.webshots.com/image/43557/2003415695415705805_rs.jpg
The Red squares are sub points whilst the x is the main point.
Here is the script, make sure when you stand in the spot that all the spots are within view.
program New;
program New;
{.include srl/srl.scar}
{.include srl/srl/misc/path.scar}
function Biggest(n1, n2 : Integer) : integer;
begin
if n1 > n2 then Result := n1 else Result := n2;
end;
function VrkRdClr : integer;//This function was created by footballjds
//And you Must get direct permission
//BEFORE using it, and you MUST Credit.
var
Points : TPointArray;
colors, UniqueColors, howmany : TIntegerArray;
i, a, timeTook, uniqLength, ColorLength : integer;
newColor : boolean;
Mostest : array[0..1] of integer;
begin
MarkTime(timeTook);
FindColorsSpiralTolerance(MMCX, MMCY, Points, 8291463, MMX1, MMY1, MMX2, MMY2, 25);
colors := GetColors(Points);
ColorLength := Length(Colors) -1;
for i := 0 to ColorLength do
begin
NewColor := True;
for a := 0 to GetArrayLength(UniqueColors) - 1 do
begin
if(UniqueColors[a] = Colors[i])then
begin
NewColor := False;
Break;
end;
end;
if(NewColor)then
begin
SetArrayLength(UniqueColors, GetArrayLength(UniqueColors) + 1);
UniqueColors[GetArrayLength(UniqueColors) - 1] := Colors[i];
end;
end;
SetArrayLength(howmany, GetArrayLength(UniqueColors));
uniqLength := GetArrayLength(UniqueColors) - 1;
for I := 0 to uniqLength do
begin
for A := 0 to GetArrayLength(colors) - 1 do
begin
if UniqueColors[i] = colors[a] then Inc(howmany[i]);
end;
end;
for I := 0 to uniqLength do
begin
Mostest[0] := Biggest(HowMany[i], Mostest[0]);
Mostest[1] := i;
end;
for I :=0 to uniqLength do
begin
if Mostest[0] = HowMany[i] then break;
end;
if Mostest[0] < 400 then EXIT;
Result := UniqueColors[i];
Writeln('Took: ' + IntToStr(TimeFromMark(timeTook)));
Writeln('Road color is: ' + IntToStr(Result));
end;
begin
MouseSpeed := 16;
RoadColor := VrkRdClr;
Path[0].Mainpoint.x:=966;
Path[0].Mainpoint.y:=268;
Path[0].Subpoints[0].x:=950;
Path[0].Subpoints[0].y:=200;
Path[0].Subpoints[1].x:=954;
Path[0].Subpoints[1].y:=228;
Path[0].Subpoints[2].x:=975;
Path[0].Subpoints[2].y:=251;
Path[0].Subpoints[3].x:=949;
Path[0].Subpoints[3].y:=282;
Path[0].Subpoints[4].x:=959;
Path[0].Subpoints[4].y:=297;
Writeln(BoolToStr(FindPath(0, False)));
end.
IF you have any troubles please feel free to ask.(this is my first TuT on scripting. WalkPath(0); is VERY pwerfull and extremely easy to use, ask me when you encounter trouble).
when you are actually doing walking you will need to do: WalkPath(0); instead of findPath(0);
also when you create multiple DDTM arrays to walk you will need each one to be different IE, one is path[0].ect whilst the next is path[1].ect ect...
and walkPath(1 <-- just refers to the number between the "[" and "]");
First I’ll tell you a little about it,
WalkPath(0); uses DDTM’s to search the minimap for the road you are looking for(path). It uses DDTM’s so you might think it is slow, actually it is quite fast. BECAUSE it only uses one color, the road color, the path color, or any other color. Thus making it practically instant, but VERY accurate.
First of all you might want to look at the path.scar file. It is in the misc includes.
The absolute first thing (after looking through the file), is to update it, yes srl devs are good, but they haven’t updated the path.scar and it won’t compile. Here is a working vers(I edited myself). // -------------------------------------------------------------------------- //
//-- Scar Standard Resource Library ------------ //
//-- » DDTM-Path Routines ------------ //
//--------------------------------------------------------------------------- //
// * Function SetPath(Number: Integer): Integer; //* by WT-Fakawi
// * Function WalkPath(ThePath: Integer): Boolean; //* by WT-Fakawi
// * Function FindPath(ThePath: Integer; Click: Boolean): Boolean; //* by WT-Fakawi
// * procedure PathRecorder(StartPath: Integer); //* by WT-Fakawi
// * File Edited by: Footballjds so that it compiles //*by Footballjds
{ type TDTMPoints;
Description: Define Path structure. One Main Point ( any color ) and upto 10 SubPoint of the SAME color. }
type
TDTMPoints = record
MainPoint: TPoint;
SubPoints: array[0..10] of TPoint;
end;
{ var Path: array[0..50] of TDTMPoints;
Description: Predefines Type array Path. }
var
Path: array[0..50] of TDTMPoints;
{
procedure SetupPaths;
begin
// YOUR PATHS IN HERE
end;
}
{************************************************* ******************************
function SetPath(Number: Integer): Integer;
By: WT-Fakawi
Description: Assembles DTM from Path. Inputs Path-Index, outputs DTM.
Usage: TheDTM := SetPath(0); or FindDTMRotated(SetPath(4).....
************************************************** *****************************}
function SetPath(Number: Integer): Integer;
var
DTMSubPoints: array of TDTMPointDef;
DTMMainPoint: TDTMPointDef;
TempTDTM: TDTM;
NrofSubPoints, i: Integer;
TheDTM: Integer;
begin
for i := 0 to 9 do // Calculate ArrayLength
if ((Path[Number].SubPoints[i].x = 0) and
(Path[Number].SubPoints[i].y = 0)) then
begin
NrofSubPoints := i;
Break;
end;
SetArrayLength(DTMSubPoints, NrofSubPoints);
DTMMainPoint.x := Path[Number].Mainpoint.x;
DTMMainPoint.y := Path[Number].Mainpoint.y;
DTMMainPoint.areasize := 1;
DTMMainPoint.areashape := 0;
DTMMainPoint.color := RoadColor;
DTMMainPoint.tolerance := 0;
for i := 0 to NrofSubPoints - 1 do
begin
DTMSubPoints[i].x := Path[Number].SubPoints[i].x;
DTMSubPoints[i].y := Path[Number].SubPoints[i].y;
DTMSubPoints[i].areasize := 1;
DTMSubPoints[i].areashape := 0;
DTMSubPoints[i].color := RoadColor;
DTMSubPoints[i].tolerance := 0;
end;
TempTDTM.MainPoint := DTMMainPoint;
TempTDTM.SubPoints := DTMSubPoints;
TheDTM := AddDTM(TempTDTM);
Result := TheDTM;
end;
{************************************************* ******************************
function WalkPath(ThePath: Integer): Boolean;
By: WT-Fakawi
Description: Simple Roadclicker, checks for RoadColor changes using CountFlag.
Returns False if Path not found.
Usage: WalkPath(1);
************************************************** *****************************}
function WalkPath(ThePath: Integer): Boolean;
var
WhichAngle: Extended;
TheDTM, x, y: Integer;
begin
TheDTM := SetPath(ThePath);
if FindDtmRotated(TheDTM, x, y, MMX1, MMY1, MMX2, MMY2, Radians(-35), Radians(35), 0.05,
WhichAngle) then
begin
FreeDTM(TheDTM);
Mouse(x, y, 0, 0, True);
Wait(1000);
FFlag(5);
Result := True;
end else FreeDTM(TheDTM);
end;
{************************************************* ******************************
function FindPath(ThePath: Integer; Click: Boolean): Boolean;
By: WT-Fakawi
Description: Returns True if Path was found.
Usage:
repeat
WalkPath(1);
until FindPath(2, True);
************************************************** *****************************}
function FindPath(ThePath: Integer; Click: Boolean): Boolean;
var
WhichAngle: Extended;
TheDTM, x, y: Integer;
begin
TheDTM := SetPath(ThePath);
if FindDtmRotated(TheDTM, x, y, MMX1, MMY1, MMX2, MMY2, Radians(-35), Radians(35), 0.05,
WhichAngle) then
begin
FreeDTM(TheDTM);
Result := True;
if Click then
begin
Mouse(x, y, 0, 0, True);
Wait(600);
FFlag(5);
end else MMouse(x, y, 0, 0);
end else FreeDTM(TheDTM);
end;
{************************************************* ******************************
procedure PathRecorder(StartPath: Integer);
By: WT-Fakawi
Description: Simple PathRecorder.
Usage: Enter StartPath.
- Click RightMouse Button for SubPoints
- Now hover Mouse over MainPoint and hit Q
- Copy Debug printout to your script.
- Choose Subpoints carefully. Upto 9 clicks are allowed,
but 4 Subpoints should well be sufficiant.
************************************************** *****************************}
procedure PathRecorder(StartPath: Integer);
var
i, CurrentPath, SubPointCounter, x, y: Integer;
begin
CurrentPath := StartPath;
repeat
Wait(100);
if IsMouseButtonDown(False) then
begin
GetMousePos(x, y);
Path[CurrentPath].SubPoints[SubPointCounter].x := x;
Path[CurrentPath].SubPoints[SubPointCounter].y := y;
repeat
until not IsMouseButtonDown(False);
SubPointCounter := SubPointCounter + 1;
end;
if IsKeyDown('q') then
begin
GetMousePos(x, y);
Path[CurrentPath].MainPoint.x := x;
Path[CurrentPath].MainPoint.y := y;
repeat
until not IsKeyDown('q');
writeln(' Path[' + IntToStr(CurrentPath) + '].Mainpoint.x:=' + IntToStr(Path[CurrentPath].MainPoint.x) + ';');
writeln(' Path[' + IntToStr(CurrentPath) + '].Mainpoint.y:=' + IntToStr(Path[CurrentPath].MainPoint.y) + ';');
for i := 0 to SubPointCounter - 1 do
begin
writeln(' Path[' + IntToStr(CurrentPath) + '].Subpoints[' + IntToStr(i) + '].x:=' + IntToStr(Path[CurrentPath].Subpoints[i].x) + ';');
writeln(' Path[' + IntToStr(CurrentPath) + '].Subpoints[' + IntToStr(i) + '].y:=' + IntToStr(Path[CurrentPath].Subpoints[i].y) + ';');
end;
SubPointCounter := 0;
CurrentPath := CurrentPath + 1;
end;
until False;
end;
Second somethings about WalkPath(0); the 0 is the array reference, you create the paths by using “PathRecorder(0);”. You can use this script below to create a path:
program New;
{.include srl/srl.scar}
{.include srl/srl/misc/path.scar}
begin
PathRecorder(0);
end.
Open up RS and find a road (any road, a path or a regular road), and run the script. To create the sub points, just right-click at every point. Then to print out the DTM-Array, move the mouse to the main point (where you want it to walk to). And hit “q”.
When it prints out stop the script and copy it (later on when your actually using this you can just go along and create more). Paste the new DDTM array that printed out and create a new script, you can use the one below, BUT you must replace the DDTM array with your own, here is the script:
program New;
{.include srl/srl.scar}
{.include srl/srl/misc/path.scar}
begin
RoadColor := {pick the color to put here};
Path[0].Mainpoint.x:=380;
Path[0].Mainpoint.y:=428;
Path[0].Subpoints[0].x:=380;
Path[0].Subpoints[0].y:=330;
Path[0].Subpoints[1].x:=370;
Path[0].Subpoints[1].y:=266;
Path[0].Subpoints[2].x:=628;
Path[0].Subpoints[2].y:=262;
Path[0].Subpoints[3].x:=456;
Path[0].Subpoints[3].y:=397;
Path[0].Subpoints[4].x:=381;
Path[0].Subpoints[4].y:=555;
Path[0].Subpoints[5].x:=280;
Path[0].Subpoints[5].y:=287;
Writeln(BoolToStr(FindPath(0, False)));
end.
Now go to where you were b4, run the script. If you have the road color right AND your in view of all the points it will find the spot and move the mouse there, it will also print out whether or not it found it.
A few things you must know:
Your road color must be right.
WalkPath looks for the road color so you must do: "RoadColor := clr";
even if the road color isn't a road thats fine.\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
You can only pick points on the path/road(or colors EXACTLY the same).
ALL POINTS MUST be the SAME color!
You CAN use FindRoadColor to set the road color, IE RoadColor := FindRoadColor.
{Note FindRoadColor doesn’t always work.}
Be sure to pick your points strategically;).
Below is a complete example including pictures and a script :D.
Here I am picking the colors:
http://aycu38.webshots.com/image/43557/2003415695415705805_rs.jpg
The Red squares are sub points whilst the x is the main point.
Here is the script, make sure when you stand in the spot that all the spots are within view.
program New;
program New;
{.include srl/srl.scar}
{.include srl/srl/misc/path.scar}
function Biggest(n1, n2 : Integer) : integer;
begin
if n1 > n2 then Result := n1 else Result := n2;
end;
function VrkRdClr : integer;//This function was created by footballjds
//And you Must get direct permission
//BEFORE using it, and you MUST Credit.
var
Points : TPointArray;
colors, UniqueColors, howmany : TIntegerArray;
i, a, timeTook, uniqLength, ColorLength : integer;
newColor : boolean;
Mostest : array[0..1] of integer;
begin
MarkTime(timeTook);
FindColorsSpiralTolerance(MMCX, MMCY, Points, 8291463, MMX1, MMY1, MMX2, MMY2, 25);
colors := GetColors(Points);
ColorLength := Length(Colors) -1;
for i := 0 to ColorLength do
begin
NewColor := True;
for a := 0 to GetArrayLength(UniqueColors) - 1 do
begin
if(UniqueColors[a] = Colors[i])then
begin
NewColor := False;
Break;
end;
end;
if(NewColor)then
begin
SetArrayLength(UniqueColors, GetArrayLength(UniqueColors) + 1);
UniqueColors[GetArrayLength(UniqueColors) - 1] := Colors[i];
end;
end;
SetArrayLength(howmany, GetArrayLength(UniqueColors));
uniqLength := GetArrayLength(UniqueColors) - 1;
for I := 0 to uniqLength do
begin
for A := 0 to GetArrayLength(colors) - 1 do
begin
if UniqueColors[i] = colors[a] then Inc(howmany[i]);
end;
end;
for I := 0 to uniqLength do
begin
Mostest[0] := Biggest(HowMany[i], Mostest[0]);
Mostest[1] := i;
end;
for I :=0 to uniqLength do
begin
if Mostest[0] = HowMany[i] then break;
end;
if Mostest[0] < 400 then EXIT;
Result := UniqueColors[i];
Writeln('Took: ' + IntToStr(TimeFromMark(timeTook)));
Writeln('Road color is: ' + IntToStr(Result));
end;
begin
MouseSpeed := 16;
RoadColor := VrkRdClr;
Path[0].Mainpoint.x:=966;
Path[0].Mainpoint.y:=268;
Path[0].Subpoints[0].x:=950;
Path[0].Subpoints[0].y:=200;
Path[0].Subpoints[1].x:=954;
Path[0].Subpoints[1].y:=228;
Path[0].Subpoints[2].x:=975;
Path[0].Subpoints[2].y:=251;
Path[0].Subpoints[3].x:=949;
Path[0].Subpoints[3].y:=282;
Path[0].Subpoints[4].x:=959;
Path[0].Subpoints[4].y:=297;
Writeln(BoolToStr(FindPath(0, False)));
end.
IF you have any troubles please feel free to ask.(this is my first TuT on scripting. WalkPath(0); is VERY pwerfull and extremely easy to use, ask me when you encounter trouble).
when you are actually doing walking you will need to do: WalkPath(0); instead of findPath(0);
also when you create multiple DDTM arrays to walk you will need each one to be different IE, one is path[0].ect whilst the next is path[1].ect ect...
and walkPath(1 <-- just refers to the number between the "[" and "]");