Game Development Community

A Kork by any other name...

by Rodney (OldRod) Burns · in Torque Game Engine · 05/17/2005 (6:58 am) · 2 replies

I'm trying to spawn a new critter, based off the Kork aiplayer. Everything is working fine, but when I try to rename him I'm having problems.

Is there something that prevents certain characters in a name, like spaces?

For example "Kork" works, but "A Kork" doesn't - the bot doesn't spawn, although there's no error in the console that I can see.

Is the space messing me up somewhere?

#1
05/17/2005 (8:06 am)
Well, logic would tell you to see if it works without spaces and special characters. If it does, then that is obviously your problem.
#2
05/17/2005 (9:24 am)
Ok, here's what I'm saying. This code is from aiplayer.cs:

function AIManager::spawn(%this)
{
   %player = AIPlayer::spawnOnPath("Kork","MissionGroup/Paths/Path1");
   %player.followPath("MissionGroup/Paths/Path1",-1);

   %player.mountImage(CrossbowImage,0);
   %player.setInventory(CrossbowAmmo,1000);
   return %player;
}

If I change "Kork" to "K O R K" the bot will not spawn.

If I leave it alone, but then add

%player.setShapeName("K O R K");

right before the "return %player;" it works and I have a bot named "K O R K" running around.

My question is, why doesn't it work in the SpawnOnPath call?