Ifp

From EDukeWiki
Revision as of 12:51, 4 May 2009 by One (talk | contribs)
Jump to navigation Jump to search

ifp <condition>

Ifp is an if statement which checks cases relative to the current player. As with all if statements, if <condition> is true it will execute the proceeding code.

Ifp operates different than many if statements as it has a set of predefined valid values that simply return true or false.

These values for <condition> are as follows:


pstanding - Returns true if the player is standing (and not moving).

pwalking - Returns true if the player is walking.

prunning - Returns true if the player is running.

pducking - Returns true if the player is crouching.

pfalling - Returns true if the player is falling.

pjumping - Returns true if the player is jumping.

phigher - Returns true if the player is higher than the actor calling the code.

pwalkingback - Returns true if the player is walking backwards.

prunningback - Returns true if the player is running backwards.

pkicking - Returns true if the player is using the kick.

pshrunk - Returns true if the player is smaller than normal size.

pjetpack - Returns true if the player is using the jetpack.

ponsteroids - Returns true if the player is using steroids.

ponground - Returns true if the player is on a solid surface (including sprite constructions).

palive - Returns true if the player is alive.

pdead - Returns true if the player is dead.

pfacing - Returns true if the player is facing the current actor.