Game Development Community

SimObject distroyed after clientLeaveGame

by gamer · in Torque Game Engine · 10/02/2006 (3:38 pm) · 1 replies

I defined a global variable $tester that points to a simobject in GameConnection:onCliengEnterGame(), but in onClientLeaveGame, the simobject no longer exists. why? thanks!

function GameConnection::onClientEnterGame(%this){
  $tester=new SimObject();
}
function GameConnection::onClientLeaveGame(%this)
{

     error("client leave game");
     echo($tester);
     $tester.dump();
}

it prints
client leave game
1546
unable to find object: '1546' attemping to call function dump.

#1
10/07/2006 (8:16 am)
Hmm try adding the simobject in game with the mission editor?