Question
by theguy · in Torque Game Engine · 02/06/2003 (2:42 pm) · 1 replies
I'm Calling this from the AIPlayer.cs file onAdd. My Question is how come it won't call the function setDestination and/or move, I get this message:
==> $myBot01=aiAddPlayer("Jimbo Jones");
CADD: 1437 ai:local
I've Been added
Going to Move to 100.1000.2000.20
fps/server/scripts/aiPlayer.cs (53): Unable to find object: ' ' attempting to call function 'setDestination'
fps/server/scripts/aiPlayer.cs (54): Unable to find object: ' ' attempting to call function 'move'
Mapping string: %1 joined the game. to index: 13
Mapping string: Jimbo Jones to index:
Here is my code
function AIPlayer::onAdd() {
echo( "I've been added." );
$moveCounter = 1;
%move[0] = "0.0.0.1";
%move[1] = "100.1000.2000.20";
echo("Going to Move to " @ %move[$moveCounter]);
$myBot01.setDestination(%move[$moveCounter]);
$myBot01.move();
}
Some one said something about instances but I need to know how to go about making it work or if someone could please explain the logic
==> $myBot01=aiAddPlayer("Jimbo Jones");
CADD: 1437 ai:local
I've Been added
Going to Move to 100.1000.2000.20
fps/server/scripts/aiPlayer.cs (53): Unable to find object: ' ' attempting to call function 'setDestination'
fps/server/scripts/aiPlayer.cs (54): Unable to find object: ' ' attempting to call function 'move'
Mapping string: %1 joined the game. to index: 13
Mapping string: Jimbo Jones to index:
Here is my code
function AIPlayer::onAdd() {
echo( "I've been added." );
$moveCounter = 1;
%move[0] = "0.0.0.1";
%move[1] = "100.1000.2000.20";
echo("Going to Move to " @ %move[$moveCounter]);
$myBot01.setDestination(%move[$moveCounter]);
$myBot01.move();
}
Some one said something about instances but I need to know how to go about making it work or if someone could please explain the logic
About the author
Alex "IkoTikashi" Zappe