Fall/Impact Damage

So, I’ve noticed that a lot of video games have fall damage, and some have impact damage. I’ve seen decent attempts at replicating this on roblox - but none that truly seem to capture the essence of what Fall/Impact Damage really is.

What if, when creating a game, you could just check a box and turn on fall damage, and a separate one for impact damage - I think making this feature an official roblox feature, instead of one that needs to be scripted - the majority of roblox might not be capable of this level of scripting - would improve games such as:

-Obbies
-Fighting Games
-Disaster Games (stickmasterluke’s game currently has a pretty good fall damage script, but no impact one)
-RP Games
-etc.

I’m not saying this feature is impossible to script - but the current scripts seem to either increase lag, or not be 100% functional

3 Likes

It would be a nice addition to the roblox characters.

However, I would much prefer them to implement it using pure Lua. This might require exposing some new functionality to be able to work with forces and collisions better, which would benefit many other things too. It would also prevent the humanoid object from becoming too specific, and being a script it would be easy to modify to add your own stuff. Kind of like when people used the character animation script to make animated zombies.

1 Like

[quote] It would be a nice addition to the roblox characters.

However, I would much prefer them to implement it using pure Lua. This might require exposing some new functionality to be able to work with forces and collisions better, which would benefit many other things too. It would also prevent the humanoid object from becoming too specific, and being a script it would be easy to modify to add your own stuff. Kind of like when people used the character animation script to make animated zombies. [/quote]

Yeah, it would be great to see the force that is applied to the part, so I guess that would serve better.

1 Like

Actually the force wouldnt be enough (that would just allow for G-force damage from too high acceleration… which probably happens when the character starts walking due to the superhuman forces the humanoid has -.-)

What would be nice would be an advanced version of .Touched that would also pass information such as contact point, contact force and any other relevant information. The new params could be added to the existing event or a new event could be added (Which might make sense if there is a performance hit to providing the extra information)

As in:
part.Touched:connect(
function(part, contactPointVector, contactForceScalar, relativeContactVelocityVector)
–make bones of character shoot through brain here
end
)

There are already many scripts out there that can do this, (however walking too fast/flying is a problem)

[code]bin = script.Parent
humanoid = bin:FindFirstChild(“Humanoid”)
ll = bin:FindFirstChild(“Left Leg”)
rl = bin:FindFirstChild(“Right Leg”)
la = bin:FindFirstChild(“Left Arm”)
ra = bin:FindFirstChild(“Right Arm”)
h = bin:FindFirstChild(“Head”)
t = bin:FindFirstChild(“Torso”)
ll.CanCollide = true
la.CanCollide = true
ra.CanCollide = true
rl.CanCollide = true
h.CanCollide = true
t.CanCollide = true
ll.Elasticity = 0
la.Elasticity = 0
ra.Elasticity = 0
rl.Elasticity = 0
h.Elasticity = 0
t.Elasticity = 0

function HitGround(part)
local blah = bin:findFirstChild(“AlreadyHit”)
if t.Velocity.y<-60 and part.Name~=“Pillow” and blah==nil then
wee = Instance.new(“IntValue”)
wee.Name = “AlreadyHit”
wee.Parent = bin
humanoid.Health = humanoid.Health + t.Velocity.y/3
wait(1)
wee:Remove()
end
end

ll.Touched:connect(HitGround)
rl.Touched:connect(HitGround)
la.Touched:connect(HitGround)
ra.Touched:connect(HitGround)
h.Touched:connect(HitGround)[/code]

But having an API would be nice, or an option as you said.

When I have done fall damage scripts I have usually used a circular buffer where I save the velocities of the last N frames.

This is reliable because with .Touched events, the event might come too late (and the velocity isnt the same as it was during impact) and additionally if you only check the velocity, the character will get hurt even if you just slightly touch a part when falling even if it doesnt even slow you down at all.

The buffer allows me to find the change in velocity within a short time period, so it basically causes damage whenever there is high acceleration such as when hitting the floor after a fall and quickly stopping.

1 Like

Only if it’s an optional property.

I don’t support this thread. Character fall damage is far to complex to have a one size fits all solution. I think it would be for the best if you used custom systems. If Roblox made a system for it, I’d want to be able to adjust the speed that causes damage, how much damage, possibly an function that turns their speed into a certain amount of damage. I can’t see one feature from Roblox being able to tailor to everyone that wants it.

Who says there can’t be properties to fall damage like the ones you listed - its not like there is just one type of pointlight - another roblox feature. It could be part of the workspace like

FallDamage: (Boolean)
ImpactDamage: (Boolean)
MinimumForceDamage: (Integer)

3 Likes