Game Development Community

Damage from fall

by Howard Dortch · in Torque Game Engine · 08/11/2004 (6:06 am) · 4 replies

I have been lookin in the scripts for a way to damage my characters if they jump out of a building upper floor would that be the onCollision()? I can shake the camera but can't apply damage. Anyone know where to do this?

#1
08/11/2004 (6:22 am)
Look in here for the answers you seek

minImpactSpeed = 45;
speedDamageScale = 0.4;

lower the min impact speed and/or raise the speeddamage scale.. :)

this will inflict damage depending on the speed of your player.

* this is in player.cs.. :)
#2
08/11/2004 (6:44 am)
Doh! that was too easy.... thanks!
#3
08/11/2004 (7:58 am)
Wow, that is easy... If everything were like that, everyone would be game developers. ;)
#4
08/11/2004 (11:51 am)
Does that mean that you could set it so that if you were running so fast, and hit something that you could damage yourself also. Like running into a wall, and smacking your nose. Or is that strictly on the Z-Axis for the Impact speed.