Ifp

From EDukeWiki
Jump to: navigation, 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.


These are actually DEFed and have associated values:

define pstanding 1

define pwalking 2

define prunning 4

define pducking 8

define pfalling 16

define pjumping 32

define phigher 64

define pwalkingback 128

define prunningback 256

define pkicking 512

define pshrunk 1024

define pjetpack 2048

define ponsteroids 4096

define ponground 8192

define palive 16384

define pdead 32768

define pfacing 65536