Problem with a function
by AIDan · in Torque Game Engine · 05/19/2002 (10:24 am) · 1 replies
Hi
Where is the mistake?? NPC::create is not called, instead of this, it wants to call PlayerData::create.
Where is the mistake?? NPC::create is not called, instead of this, it wants to call PlayerData::create.
datablock PlayerData(DefaultArmor)
{
class= "NPC";
category= "NPC";
...
}
function NPC::create(%datablock)
{
// Create the player object
%npc= new Player()
{
dataBlock= %datablock;
};
//%obj.setControlObject(%player); // <- AI here
return %npc;
}About the author
Torque Owner AIDan