Game Development Community

Clientside AIPlayer not displaying

by Leo Van Koppen · in Torque Game Engine Advanced · 05/14/2008 (4:58 am) · 0 replies

For the project I'm working on we wish to populate our world with a number of trivial NPCs. Since these NPCs will do nothing but make the world seem more alive (so no interaction), we wish to make them clientside only, so it doesn't put a load on the server.

We have made our own class for NPC, subclassed from TGEA's AIPlayer. Now if I try to spawn our own class on the client, the object exists (or something does), as it has a position, and is affected by gravity because it falls through our terrain and keeps on falling. However, the AIPlayer is not visible! I have assigned a datablock:

datablock PlayerData(Roaming)
{
   shapeFile            = "./../data/vinny/Male Western lvl 1 - sweater_pants.dts";
   category             = "Bipeds";
   ...etc
};

new RoamingAIPlayer(npc1)
{
   datablock = "Roaming";
   position = "-500 10 120";
   type = "NPC";
};

RoamingAIPlayer is our subclass of AIPlayer.

In addition to this, we create a similar RoamingAIPlayer on our server, and that IS displayed on the clients. If we create the RoamingAIPlayer on our client the object exists (it has a position and is affected by gravity), but is not displayed. I am very confused as to what is going on. The shapefile is correct as far as we can see.