Skip to content
nikki93 edited this page Sep 13, 2010 · 3 revisions

GraLL himself! A ‘Player’ is a ‘free physical object’, so you can apply forces and impulses. This is useful for scripted cutscenes.

Properties

minHeight : “-4”
The minimum Y value of the Player’s position. Anything lower than this, and Player is no more! :-(

captureCameraHandler : “yes”
Whether the Player should capture the CameraHandler for a third-person view initially.

canSwitchDimensions : “yes”
Whether the Player can switch dimensions.

Python Events

(none)

Python Properties

p_underControl
Whether the Player is under control. If False, the Player will not respond to keyboard and mouse movements (good for scripted cutscenes).

p_invincible
Whether the Player is immune to destruction.

p_canSwitchDimensions
Whether the Player can switch dimensions.

Python Methods

getControlOrientation()
Get the ‘control orientation’ (only yaw orientation without pitch or roll). This is the direction in which the Player will roll when pushing the ‘forward’ control key, hence the name.

loseCameraHandler()
Release the CameraHandler, and put it in ‘none’ mode.

captureCameraHandler()
Capture the CameraHandler and put it in ‘third-person’ mode.

switchDimension()
Switch dimensions. This will make sure that there are no physical objects in the other dimension in the Player’s space before switching to prevent intersections and physical instability.

numPickup(type)
Return the number of pickups of the given type (string).

hasPickup(type)
Whether we have at least one pickup of the given type.

incPickup(type)
Increment the number of pickups of the given type.

decPickup(type)
Decrement the number of pickups of the given type (if more than 0).

hasDecPickup(type)
Decrement the number of pickups of the given type (if more than 0), and return whether we had at least one pickup of the given type before decrementing.

Clone this wiki locally