Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Prevent fall damage or falling death

From EDukeWiki

The following code can be used to prevent the player from either receiving fall damage, or from hitting 'terminal velocity', which results in death upon hitting the ground.

You'll need a single gamevar to hold the value of falling_counter.

gamevar fallcounter 0 1

Inside the APLAYER actor, use the following code to restrict the falling counter to prevent falling deaths:

getplayer[THISACTOR].falling_counter fallcounter
ifvarg fallcounter 61
{
  setvar fallcounter 61 // any value under 62 is non-fatal
  setplayer[THISACTOR].falling_counter fallcounter
}

To prevent ANY fall damage to the player, change it to the following

getplayer[THISACTOR].falling_counter fallcounter
ifvarg fallcounter 8
{
  setvar fallcounter 8 // any value under 9 does no damage
  setplayer[THISACTOR].falling_counter fallcounter
}

Retrieved from "http://localhost../../../p/r/e/Prevent_fall_damage_or_falling_death.html"

This page has been accessed 80 times. This page was last modified 11:10, 24 September 2006 by EDukeWiki user LordMisfit.


[Main Page]
Main Page
Recent changes
Random page
EDuke32.com

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports