This seems to work but looks wrong.
by Dreamer · in Torque Game Engine · 05/01/2005 (12:52 am) · 1 replies
Hello all, I wanted to create a ConsoleMethod to allow the scripts to update a players MaxDamage.
The following appears to work fine, but looks wrong to me, can someone please tell me if I'm just being paranoid, and if not, then how I should go about fixing it.
Thanks in advance.
The following appears to work fine, but looks wrong to me, can someone please tell me if I'm just being paranoid, and if not, then how I should go about fixing it.
void ShapeBase::setMaxDamage(int damage){
mDataBlock->maxDamage = damage;
updateDamageLevel();
}
ConsoleMethod( ShapeBase, setMaxDamage, void, 3, 3, "(int MaxDamage)")
{
object->setMaxDamage(dAtoi(argv[2]));
}Thanks in advance.
Torque 3D Owner Xavier "eXoDuS" Amado
Default Studio Name