Author Topic: Set fall damage.  (Read 2151 times)

i wouldn't say fall damage, i'd say velocity when hitting the object

i wouldn't say fall damage, i'd say velocity when hitting the object

I'm not even sure if fall damage (by height) is possible.

Probably possible, but if possible I'd take use packaging to make this.

i wouldn't say fall damage, i'd say velocity when hitting the object
Yes, this.

You will have to set the velocity it takes to kill in the script.
Don't forget to use the parent.

So, any particular reason why people are still talking about how it should be possible, etc, after I already posted a script that does it? Even if you didn't like the way it works, which is understandable because it would only affect one playertype, but still a comment saying that would be nice.



Anyways, I tried looking into things to package. onCollision is not called on collision with bricks and interiors, probably among other things. Running a trace and then falling to death shows onImpact as the first function called, and that is only called when the player falls enough to take fall damage.

My only other idea is quite hacky (though I feel that I may be missing something big that would make it less hacky)  - loop through all PlayerData datablocks, set their minImpactSpeed to a really low number so onImpact is always called, and then rewrite onImpact to compare their speed with a pref before applying damage

Loop through all PlayerData datablocks, set their minImpactSpeed to a really low number so onImpact is always called, and then rewrite onImpact to compare their speed with a pref before applying damage
My idea exactly.

This would be good, it should be an RTB server preference.

How about a 1 brick fall damage height? :cookieMonster:

TROLOLOLOL! Epic DM folks!

Falling damage is calculated by velocity (half-bricks per second), not in bric-.

FFFFFFFFFFFFFFFFFFFFFFFFFFFFF UUUUUU-
I'm pretty sure that fall damage goes by velocity upon impact, not just height

-1 Falling damage Height.

Edit, owait that means no falling damage...  Heh
it also means that when you jump and hit something, you die.

-1 Falling damage Height.

Edit, owait that means no falling damage...  Heh
I tried it, it just gives you a bitchton of camera shaking with no fall damage

I forgot to mention you might as well set a limit for how low you should allow it to go to  prevent abuse.

I forgot to mention you might as well set a limit for how low you should allow it to go to  prevent abuse.
server host's choice, i would leave it, for cases where no jumping is allowed or something
Falling damage is calculated by velocity (half-bricks per second), not in bric-.

FFFFFFFFFFFFFFFFFFFFFFFFFFFFF UUUUUU-
double late? :D
i wouldn't say fall damage, i'd say velocity when hitting the object

Code: [Select]
function serverCmdFallSpeed(%client,%speed)
{
    if(%client.isAdmin)
    {
        playerStandardArmor.minImpactSpeed = %speed;
        messageAll('','Minimum impact speed is now ' @ %speed);
    }
    else
        messageClient(%client,'','You are not an admin!');
}

Untested
I don't think that would update all the datablocks created based on playerStandardArmor. And what about playertypes that aren't?

Since the impact speed seems to affect the camera shaking in a way that doesn't involve the script, wouldn't that cause problems if someone connected when the impact speed was set really low, then it was changed back to normal while they were there? Would it cause their camera to shake like crazy while they walked down a flight of stairs?

You don't have to do it for the datablock.

You can overwrite the onImpact function and toss in your own stuff.
I did this for DRPG's nation perk, falling safety.

I don't think that would update all the datablocks created based on playerStandardArmor. And what about playertypes that aren't?
It wouldn't, as mentioned in a previous post.

You can overwrite the onImpact function and toss in your own stuff.
A trace showed the onImpact was only called from a height that would already have made that take fall damage, meaning you could easily increase the distance, but what about decreasing?