Game Development Community

MissionCleanup Problem

by Richard_H · in Torque Game Engine · 11/10/2006 (7:30 pm) · 1 replies

Hi,

for my game I have been experimenting with scripted-ai and all of the sudden part of my script starts complaining about MissionCleanup and think (a function that was already there and working).
Here is what I have:
function AIPlayer::spawn(%name,%spawnPoint)
{
   // Create the demo player object
   %player = new AiPlayer() {
      dataBlock = TestPlayer;
      path = "";
   };
   
   echo("Spawned!");
   MissionCleanup.add(%player);
   %player.setShapeName(%name);
   %player.name = %name;
   %player.setTransform(%spawnPoint);
   %player.think();
   return %player;
}
This error happened after I moved the spawnpoint the aiplayer spawned at, which seems to be working fine. The only errors are with MissionCleanup and think.
Any help would be apreciated.

#1
11/10/2006 (7:50 pm)
Nevermind, the errors I were getting were because the AIPlayer was spawning while the mission was finishing loading. He still won't appear though...