Log in

View Full Version : ObjectDTM help



laakerules
01-30-2012, 01:34 AM
Gahhh, this is making me angry. Half the time it works and half the time it doesnt. IS it better to use srl walking. Cause that seems random. Also is there a way to do a single path for the object dtm rather than like 17 points?

Drax
01-30-2012, 01:45 AM
My walking looks like this. You don't really need fail safes with Dtm Walking either and it has a built in wait for flag function so you don't need to add that.

Procedure WalkToBank;
begin
Antirandoms;
if ObjDTM_Walk('84:22:4:3:7:67:43:3:7:43:63:3:7:40:76 :3:7:28:72:4:73:8:73:27:98:30:98:9', 0, 100, 80, True) then
Antiban;
if ObjDTM_Walk('106:48:3:10:7:119:69:10:7:119:61:10:7 :119:53:4:98:27:97:50:116:51:115:27', 0, 100, 80, True) then
Antirandoms;
if ObjDTM_Walk('73:66:3:1:7:95:47:1:7:123:80:3:7:128: 96:4:69:57:70:73:84:73:83:57', 0, 100, 80, True) then
begin
WriteLn('Now at Bank')
MakeCompass(0);
end else WriteLn('Could not find Bank');
end;

laakerules
01-30-2012, 02:18 AM
Thanks but i need something like the difference beetween


if ObjDTM_Walk('143:74:4:3:7:84:62:3:7:97:70:3:7:109: 66:3:7:114:95', 0, 100, 80, True) then



into using something like


['19:56:6:0:7:41:92:1:7:139:66:2:7:120:103:7:7:47:1 16:10:7:89:71:10:7:89:79',
'12:106:6:0:7:106:114:3:7:42:118:3:7:46:126:6:7:77 :98:6:7:110:19:6:7:112:31',
'11:84:6:3:7:103:86:3:7:108:94:2:7:23:74:2:7:23:50 :6:7:140:66:7:7:77:146',
'10:60:8:2:7:90:65:2:7:89:41:2:7:49:30:2:7:38:74:2 :7:26:62:2:7:70:101:2:7:71:125:3:7:76:91,'
'79:14:11:1:7:60:44:1:7:47:91:1:7:71:126:1:7:54:15 :2:7:90:77:2:7:102:89:2:7:78:101:2:7:82:37:2:7:113 :45:2:7:113:30:3:7:44:64',
'46:19:8:1:7:54:82:1:7:46:79:1:7:60:111:1:7:31:86: 2:7:86:73:2:7:89:57:2:7:74:34:2:7:82:103',
'16:59:10:1:7:51:122:1:7:79:134:2:7:106:72:2:7:106 :88:2:7:97:52:2:7:62:61:2:7:42:54:2:7:69:29:3:7:60 :83:3:7:17:84',
'40:85:8:2:7:102:73:2:7:54:49:2:7:122:81:3:7:76:10 3:3:7:48:119:3:7:60:79:3:7:48:71:3:7:72:75'

Yago
01-30-2012, 02:20 AM
IT works flawlessly for me... What do you need exactly?

laakerules
01-30-2012, 02:25 AM
Idk, just seems easier to replace the LArge, path instead of each individual one once i create more accurate paths! Rather than doign one walking my guy there doing another and so on copying and pasting from each one to the walking methods in my script. Like is there a way to implement the path instead of the single?

euphemism
01-30-2012, 02:46 AM
er, ObjDTM_WalkPath ?

laakerules
01-30-2012, 02:53 AM
Hey euphemism

Like this?



begin
ClickNorth(0);
if ObjDTM_WalkPath(['15:66:6:1:7:142:65:2:7:126:56:2:7:134:76:2:7:123: 104:10:7:90:79:10:7:90:71', '9:97:3:3:7:45:111:6:7:76:83:7:7:114:124', '13:55:6:2:7:31:70:2:7:30:46:3:7:111:82:3:7:116:90 :3:7:85:142:3:7:17:96', '31:27:6:2:7:101:68:2:7:102:92:2:7:83:128:2:7:51:1 01:2:7:39:89:2:7:30:49', '45:15:9:2:7:78:29:2:7:86:41:2:7:94:53:2:7:90:69:2 :7:98:29:2:7:118:109:1:7:50:75:1:7:34:82:1:7:22:62 ', '10:73:6:2:7:54:57:2:7:74:65:2:7:110:57:2:7:118:93 :3:7:72:87:3:7:28:87', '57:75:5:3:7:72:59:3:7:83:67:3:7:96:63:3:7:100:91: 3:7:71:107']) then
begin

repeat
wait(100);
until(Not IsMoving);
end;


And im getting this error,

[Error] (1454:532): Invalid number of parameters at line 1453
Compiling failed.

euphemism
01-30-2012, 04:41 AM
Hey euphemism

Like this?



begin
ClickNorth(0);
if ObjDTM_WalkPath(['15:66:6:1:7:142:65:2:7:126:56:2:7:134:76:2:7:123: 104:10:7:90:79:10:7:90:71', '9:97:3:3:7:45:111:6:7:76:83:7:7:114:124', '13:55:6:2:7:31:70:2:7:30:46:3:7:111:82:3:7:116:90 :3:7:85:142:3:7:17:96', '31:27:6:2:7:101:68:2:7:102:92:2:7:83:128:2:7:51:1 01:2:7:39:89:2:7:30:49', '45:15:9:2:7:78:29:2:7:86:41:2:7:94:53:2:7:90:69:2 :7:98:29:2:7:118:109:1:7:50:75:1:7:34:82:1:7:22:62 ', '10:73:6:2:7:54:57:2:7:74:65:2:7:110:57:2:7:118:93 :3:7:72:87:3:7:28:87', '57:75:5:3:7:72:59:3:7:83:67:3:7:96:63:3:7:100:91: 3:7:71:107']) then
begin

repeat
wait(100);
until(Not IsMoving);
end;


And im getting this error,

[Error] (1454:532): Invalid number of parameters at line 1453
Compiling failed.
Close.
The error, did you read it? It tells you what is wrong.

laakerules
01-30-2012, 04:52 AM
Ya, but i dont understand what it means invalid number of parameters. This is my second script with object DTM so i know nothing of how it works. I just used the tool and put the numbers in with the one spot format.

So what does it look like with the path version?

jatex
01-30-2012, 05:08 AM
Ya, but i dont understand what it means invalid number of parameters. This is my second script with object DTM so i know nothing of how it works. I just used the tool and put the numbers in with the one spot format.

So what does it look like with the path version?

Invalid number of parameters is like a invalid amount of information within it.


function ObjDTM_WalkPath(Path: TStringArray; FlagDistance, PollRate,
Tries: Integer; CheckEndPoints, GroundLevel: Boolean): Boolean;

That's all the information that needs to be included.
Example:


ObjDTM_WalkPath(['15:66:6:1:7:142:65:2:7:126:56:2:7:134:76:2:7:123: 104:10:7:90:79:10:7:90:71', '9:97:3:3:7:45:111:6:7:76:83:7:7:114:124', '13:55:6:2:7:31:70:2:7:30:46:3:7:111:82:3:7:116:90 :3:7:85:142:3:7:17:96', '31:27:6:2:7:101:68:2:7:102:92:2:7:83:128:2:7:51:1 01:2:7:39:89:2:7:30:49', '45:15:9:2:7:78:29:2:7:86:41:2:7:94:53:2:7:90:69:2 :7:98:29:2:7:118:109:1:7:50:75:1:7:34:82:1:7:22:62 ', '10:73:6:2:7:54:57:2:7:74:65:2:7:110:57:2:7:118:93 :3:7:72:87:3:7:28:87', '57:75:5:3:7:72:59:3:7:83:67:3:7:96:63:3:7:100:91: 3:7:71:107'],6,100,80,False,True);

It will wait until within 6 to walk to the next spot, the poll rate is 100, it will attempt finding the Obj_DTM 80 times, it will not check for end points, and the path is on ground level.

laakerules
01-30-2012, 05:11 AM
Oh ok, thanks. I just kept putting the ] end bracket inside the end ) parenthese my bad.

euphemism
01-30-2012, 05:18 AM
Ya, but i dont understand what it means invalid number of parameters. This is my second script with object DTM so i know nothing of how it works.

"Invalid parameters" isn't exclusive to my include, that will happen with any function/procedure you don't pass the correct parameters to. Parameters are the variables you pass to a function/procedure.

laakerules
01-30-2012, 05:25 AM
"Invalid parameters" isn't exclusive to my include, that will happen with any function/procedure you don't pass the correct parameters to. Parameters are the variables you pass to a function/procedure.

Ya, sorry i meant like i dont know how many paramiters and such are in the object dtm code. Your code, i didnt know what paramiters where in it.

fre
01-30-2012, 05:49 AM
DTM's on MM change too.
Sometimes you only see half a tree or a ladder.
Then this dtm walking will fail.