Question)Poison Death
by Temasek Polytechnic Tp8 · in Torque Game Engine · 02/08/2007 (5:42 pm) · 0 replies
I do a coding for a poison item, whenever a user when over a poison healthkit it will minus 20hp
Dam = 20;
};
function HealthPatch::onCollision(%this,%obj,%col)
{
// Apply health to colliding object if it needs it.
// Works for all shapebase objects.
if (%col.getState() !$= "Dead" )
{
%col.applyDamage(%this.Dam);
%location = "Body";
%obj.respawn();
if (%col.client)
messageClient(%col.client, 'MsgHealthPatchUsed', '\c2Health Patch Applied');
}
}
but after the character die, it cannot be respawn and it since that the keyboard is freeze...
anyone know what when wrong . thank in advance
Dam = 20;
};
function HealthPatch::onCollision(%this,%obj,%col)
{
// Apply health to colliding object if it needs it.
// Works for all shapebase objects.
if (%col.getState() !$= "Dead" )
{
%col.applyDamage(%this.Dam);
%location = "Body";
%obj.respawn();
if (%col.client)
messageClient(%col.client, 'MsgHealthPatchUsed', '\c2Health Patch Applied');
}
}
but after the character die, it cannot be respawn and it since that the keyboard is freeze...
anyone know what when wrong . thank in advance
About the author