Game Development Community

Explosions not working on a dedicated client

by Peter Simard · in Torque Game Engine · 09/09/2005 (8:27 pm) · 6 replies

I have been so far unable to get an explosion to work on a dedicated client. I have tried the following:

Spawnings the explosion on the server
Result: Works fine single player, dedicated server gives error:

starter.fps/server/scripts/player.cs (992): Register object failed for object (null) of class Explosion.

Spawning the explosion on the client
Resukt: Works fine single player, dedicated client gives an error saying the datablock is not a member of the gamebasedata class.

Here is how I am spawning the explosion on the server:

function makeBloodSpurt(%obj)
{   
	   %p = new Explosion() {
	      dataBlock        = "BloodSpurt";
	      position = %obj.getPosition();
	   };
	   MissionCleanup.add(%p);   
}


How can I get my explosion to be sent to the client when running a dedicated server? Thanks

#1
09/09/2005 (9:19 pm)
"the datablock is not a member of the gamebasedata class."

Does the datablock even exist on the client side? Have you called dum() on it to check?
#2
09/09/2005 (10:06 pm)
Finally figured it out. When I tried putting the datablock on the client before it would crash the client. I moved the datablock into the clientCmd block and it worked. Thanks for the help
#3
08/21/2007 (1:12 pm)
Hello everyone!

Sorry for writing to this thread after 2 years but i have excactly the same problem with Peter with explosions on the client side ( i cannot see them even though i use cmdToClient and the datablock 'MineExplosion' exists in client/scripts/game.cs).
And i also have the same warnings ( the datablock is not a member of the gamebasedata class and Register object failed for object (null) of class Explosion.) but i cannot understand the solution he gave to the problem... Which datablock sould i put into the ClientCmd block?

Please help if you can.

Thanks!
#4
08/22/2007 (1:51 am)
Hello Kostas, maybe this resource can help you.

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=12178
#5
08/22/2007 (2:27 am)
What version is that? I haven't seen this error in like.. years. And we're using dedicated servers as well as listening servers when we test, neither of which has ever shown this problem.
#6
08/22/2007 (3:18 am)
You mean the version of Torque? It is version 5.
Jacobin thanks for the help!!
I am trying to find a solution from the resource you posted.