Falling counter: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
LordMisfit (talk | contribs)
m Adding in a small formula for the damage from falling based on the source code. >.>
No edit summary
 
Line 1: Line 1:
A counter initialized when the [[player]] is falling. The end value when you reach the ground is used to determine the amount of damage you receive from a fall.
'''''falling_counter''''' is incremented by 1 for each tic the [[player]]'s [[poszv]] value is greater than '''2400'''. It is initialized to 0 and is used to determine the amount of damage you receive from a fall.


If the counter reaches or exceeds '''9''', the player will take ''(falling_counter - [Random 0 to 3])'' damage
If the counter exceeds '''8''', the player will take ''('''falling_counter''' - [Random 0 to 3])'' damage upon touching the floor of a sector not [[lotag]] 1 or 2.


If the counter reaches or exceeds '''37''', the player will begin screaming as he falls.
If the counter exceeds '''37''', the player will begin screaming as he falls.


If the counter reaches or exceeds '''62''', the player has hit 'terminal velocity' and will die upon hitting the ground.
If the counter exceeds '''62''', the player has hit "terminal velocity" and will die upon impact.


Appearantly the player's [[poszv]] value must reach or exceed ''2560'' for this value to begin counting.
The maximum value for '''''falling_counter''''' is '''255'''.


'''[[Prevent_fall_damage_or_falling_death|Tutorial for limiting damage from falls or prevent falling death.]]'''
Also see '''[[Prevent_fall_damage_or_falling_death|tutorial for limiting damage from falls or prevent falling death.]]'''


[[Category:Player structure members]]
[[Category:Player structure members]]

Latest revision as of 01:47, 7 November 2009

falling_counter is incremented by 1 for each tic the player's poszv value is greater than 2400. It is initialized to 0 and is used to determine the amount of damage you receive from a fall.

If the counter exceeds 8, the player will take (falling_counter - [Random 0 to 3]) damage upon touching the floor of a sector not lotag 1 or 2.

If the counter exceeds 37, the player will begin screaming as he falls.

If the counter exceeds 62, the player has hit "terminal velocity" and will die upon impact.

The maximum value for falling_counter is 255.

Also see tutorial for limiting damage from falls or prevent falling death.