Movement
by Sam Guffey · in Technical Issues · 05/10/2002 (3:43 pm) · 9 replies
In the source there is a function conn.setMove(x, y, z [pitch, yaw, roll], true|false) "This isnt exact"
I've tried to move the AI in script form by getting the transform of the target, but the AI doesnt go any where. It just continues to stand around.
Say the AI = %obj and the target = %targ
Im running a while loop to check a 200 meter radius for potential targets, once found I set its move state to the target using.
%trans = %target.getTransform();
%obj.client.setMove(%trans, true);
I know my scripting is correct, however Im not very familiar with C++ and dont know if the source call is correct. Am I using the correct move function?
I've tried to move the AI in script form by getting the transform of the target, but the AI doesnt go any where. It just continues to stand around.
Say the AI = %obj and the target = %targ
Im running a while loop to check a 200 meter radius for potential targets, once found I set its move state to the target using.
%trans = %target.getTransform();
%obj.client.setMove(%trans, true);
I know my scripting is correct, however Im not very familiar with C++ and dont know if the source call is correct. Am I using the correct move function?
About the author
#2
05/10/2002 (5:14 pm)
The game doesnt seem to know what move() means. Was there a head release that the AI was improved in?
#3
05/10/2002 (6:15 pm)
try :void AIPlayer::setMoveSpeed( F32 speed )without that it is zero so he will just stand around
#4
.move(); is an "unknown command" and so is setSpeed(F32);
05/10/2002 (10:21 pm)
Well apparently you guys have made alterations to the AI and added code that doesnt exist in the base source..move(); is an "unknown command" and so is setSpeed(F32);
#5
this = the bot and the finalpos is figured out in scripts beforehand
05/10/2002 (10:53 pm)
um ... move() is part of player class ... try just %obj.move(); .. no idea why you are trying to move the client class ... this is how my ai moves%this.clearAim(); %this.setMoveDestination(%finalPos); %this.move();
this = the bot and the finalpos is figured out in scripts beforehand
#6
05/11/2002 (12:17 am)
Sounds like you didn't include the "game/aiPlayer.*" files and recompile your engine... all these functions definitely ARE there... even in the Release1_1_1 version...
#7
05/11/2002 (12:17 am)
Your right, the AiPlayer files where not included..Thanks gonna go test now.
#8
If it the 2nd one then what is an AIClassType?
05/11/2002 (1:06 am)
ok, now should I use the aiConnect(x); method or the aiAddPlayer( 'playerName'[, 'AIClassType'] ); method?If it the 2nd one then what is an AIClassType?
#9
Btw., did you read my 2 bot tutorials in the resource section - explains all this in detail...
05/11/2002 (1:13 am)
Use the second one, you don't need the classtype:$myBot = aiAddPlayer("Botname");should do it...Btw., did you read my 2 bot tutorials in the resource section - explains all this in detail...
Torque Owner Kevin Ostrowski