Haha, nub question....
by Sean Webster · in Technical Issues · 10/01/2007 (4:25 pm) · 2 replies
Im usin the tutorials on the site (http://www.codesampler.com/torque.htm)
and for the second to last one on makiing motion paths, i cant get the bot to spawn in the motion path i made.
Code:
function AIManager::spawn( %this )
{
// Bot_1 simply spawns without a path to follow. Since he has no path to
// follow, he'll simply spawn at the same spot that you do. This means that
// you'll have to move around to see him when the game first starts because
// he'll be right on top of you.
%bot = AIPlayer::spawn( "Bot_1", pickSpawnPoint() );
// Bot_2 has a path to follow, so we'll help him out by having him spawn
// by the Path's first Path Marker. Once he spawns, he'll begin to follow
// the path using the A.I. helper functions defined here in this file.
//%bot = AIPlayer::spawnOnPath( "Bot_2", "MissionGroup/Path" );
//%bot.followPath( "MissionGroup/Path", -1 );
return %bot;
)
I still have no basic idea although i am learnin at an OK rate i guess.
Anyone know what went wrong?
and yes, the path i made is called Path and it is in the mission group
and for the second to last one on makiing motion paths, i cant get the bot to spawn in the motion path i made.
Code:
function AIManager::spawn( %this )
{
// Bot_1 simply spawns without a path to follow. Since he has no path to
// follow, he'll simply spawn at the same spot that you do. This means that
// you'll have to move around to see him when the game first starts because
// he'll be right on top of you.
%bot = AIPlayer::spawn( "Bot_1", pickSpawnPoint() );
// Bot_2 has a path to follow, so we'll help him out by having him spawn
// by the Path's first Path Marker. Once he spawns, he'll begin to follow
// the path using the A.I. helper functions defined here in this file.
//%bot = AIPlayer::spawnOnPath( "Bot_2", "MissionGroup/Path" );
//%bot.followPath( "MissionGroup/Path", -1 );
return %bot;
)
I still have no basic idea although i am learnin at an OK rate i guess.
Anyone know what went wrong?
and yes, the path i made is called Path and it is in the mission group
About the author
Torque 3D Owner Stephen Zepp
the // in the front of the line are comments, and are ignored by Torque during run time.