Ifp: Difference between revisions
No edit summary |
No edit summary |
||
Line 44: | Line 44: | ||
[[Category:Duke3D 1.3/1.5 commands]] | [[Category:Duke3D 1.3/1.5 commands]] | ||
[[Category:If conditions]] |
Revision as of 08:29, 24 September 2005
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.