Author Topic: Where's the script for fall damage?  (Read 1733 times)

What script makes the player die from a drop?

I'm not sure, but I believe it's .dso'd.

Do you wanna turn it off?

no. I want to see an example of how player damage works in torque


GEE THANKS.......NOT!!!!

I SHALL CHECK FOR YOO

NVM I SHALL NOTS.

This isn't the exact function (the damage types are wrong, server and minigame prefs for fall damage don't work, it doesn't check for Ground fall/Wall smack) but this is the function from Blockland v0002:

Code: [Select]
function Armor::onImpact(%this, %obj, %collidedObject, %vec, %vecLen)
{
//echo("armor impact");


   %obj.damage(0, VectorAdd(%obj.getPosition(),%vec),
      %vecLen * %this.speedDamageScale, "Impact");

      %time = ( ( (%vecLen - 10) / 40) * 6) + 2;

      %time = %time * 1000;
if(%time > 8000)
%time = 8000;
if(%time < 2000)
%time = 2000;

// tumble(%obj, %time);
     
}