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

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Limit the height of the player's jump

From EDukeWiki

You can use the player member jumping_counter to limit the player's jump to less Olympic heights.

The jumping_counter increments from 0 (not jumping) to 1441 as follows:

0
181
361
541
721
901
1081
1261
1441

By manually setting the counter to 0 when the counter reaches one of these values, you can decrease the duration of the jump by effectively cancelling it mid-jump.

You'll need a pair of gamevars: one to hold the value of jumping_counter and one to contain the value 0.

gamevar temp 0 2
gamevar ZERO 0 0

Inside the APLAYER actor, use the following code to cut the jump duration in half:

getplayer[THISACTOR].jumping_counter temp
ifvare temp 721 
{
	setactor[THISACTOR].jumping_counter ZERO 
}

Retrieved from "http://sc8-pr-shell1.sourceforge.net../../../l/i/m/Limit_the_height_of_the_player%27s_jump.html"

This page has been accessed 356 times. This page was last modified 02:42, 2 March 2005 by Richard Gobeille. Based on work by EDukeWiki user(s) Usurper. Content is available under SourceForge.


[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