Game Development Community

CH6 Code - Game Crash on Death

by Trevor Gall · in Torque Game Engine · 05/03/2005 (5:15 am) · 1 replies

Using code straight from the CD CH6 folder.. Running dedicated server and a client... when avatars 'dies' game crashes...


Anyone else see this same effect?

Anyone fixed it?

About the author

Recent Threads


#1
05/04/2005 (10:30 pm)
Ah well. I just managed to bypass the code in the Player.cs script and when the damage would kill the player i invoked my own death code. So the player doesnt need to respawn, which seemed to be causing the error.
if anyone interested code follows..

%crit = %damage + %obj.GetDamageLevel();
if (%crit > 100)
{
// send a message to client to move to spawn point
commandToClient(%obj.client,'Spawn','0 0 201 1 0 0 0', %obj);
%obj.setDamageLevel(0);
%damage = 0;
}