Not a member of the 'GameBaseData
by Wolfgang Kurz · in Torque Game Engine · 11/08/2006 (2:53 pm) · 0 replies
Hello everyone,
i am really confused:-(
this is what i am doing:
I load this script:
then on client enter game i do this:
and i get the error but i am doing the eaxt same thing for my camera and there is no problem:-(
can someone please point me in the right direction? maybe i am missing something here
i am really confused:-(
this is what i am doing:
I load this script:
//------------------------------------------------------------------------
// control/player.cs
//
// player definition module for 3DGPAI1 emaga4 sample game
//
// Copyright (c) 2003 by Kenneth C. Finney.
//------------------------------------------------------------------------
datablock PlayerData(MaleAvatar)
{
renderFirstPerson = false;
emap = true;
className = Avatar;
shapeFile = "~/player.dts";
cameraMaxDist = 3;
mass = 100;
drag = 0.1;
maxdrag = 0.5;
density = 10;
maxDamage = 100;
maxEnergy = 100;
runForce = 50 * 90;
maxForwardSpeed = 15;
maxBackwardSpeed = 10;
maxSideSpeed = 12;
jumpForce = 10 * 90;
// Controls over slope of runnable/jumpable surfaces
runSurfaceAngle = 70;
jumpSurfaceAngle = 80;
minJumpSpeed = 20;
maxJumpSpeed = 30;
};
//----------------------------------------------------------------------------
// Avatar Datablock methods
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
function Avatar::onAdd(%this,%obj)
{
}
function Avatar::onRemove(%this, %obj)
{
if (%obj.client.player == %obj)
%obj.client.player = 0;
}then on client enter game i do this:
%player = new Player() {
dataBlock = MaleAvatar; // defined in player.cs
client = %this; // the avatar will have a pointer to its
}; // owner's connectionand i get the error but i am doing the eaxt same thing for my camera and there is no problem:-(
can someone please point me in the right direction? maybe i am missing something here