Quick Question if you don't mind
by Andy Vickers · in RTS Starter Kit · 02/14/2005 (6:16 am) · 1 replies
Hello there, don't want to be annoying and ask questions about every little thing, but while i am gettting used to torque it would be great if some1 could help me out with this while i am getting started.
My project is this.
I thought it best to just try and implement simple things to start off with, so the idea was to spawn 1 unit at game start, have him move to a location and then back to start again in an end less loop.
so in function RTSConnection::onClientEnterGame(%this)
i have
%this.createPlayer("0 0 250", 2); // Create a player object.
$myBotVar.setMoveDestination("20 20 250"); //makes it walk to destination
//check to see if we have reached destination
//this must not work due to getMoveDestination must send back the destination the unit
//is moving to, not its current position
if($myBotVar.getMoveDestination()==("20 20 250"))
{
// //if we have reached destination, send it back to spawn point)
$myBotVar.setMoveDestination("0 0 250");
}
My problem is this.
How do i find out if the unit has reached its destination? Do i have to use its private var Point3F mLastLocation; // For stuck check ?
My project is this.
I thought it best to just try and implement simple things to start off with, so the idea was to spawn 1 unit at game start, have him move to a location and then back to start again in an end less loop.
so in function RTSConnection::onClientEnterGame(%this)
i have
%this.createPlayer("0 0 250", 2); // Create a player object.
$myBotVar.setMoveDestination("20 20 250"); //makes it walk to destination
//check to see if we have reached destination
//this must not work due to getMoveDestination must send back the destination the unit
//is moving to, not its current position
if($myBotVar.getMoveDestination()==("20 20 250"))
{
// //if we have reached destination, send it back to spawn point)
$myBotVar.setMoveDestination("0 0 250");
}
My problem is this.
How do i find out if the unit has reached its destination? Do i have to use its private var Point3F mLastLocation; // For stuck check ?
Associate Anthony Rosenbaum