This returns the owner of the GameObject the LogicBrick is assigned
to.
All sensors inherit the following methods:
True if the sensor fires a positive pulse. Very usefull for example
to differentiate the press and release state from a KeyboardSensor.
bool getUsePosPulseMode
( );
Returns TRUE if positive pulse mode is active, FALSE if positive
pulse mode is not active.
setUsePosPulseMode
( bool
flag );
Set "flag" to TRUE to switch on positive pulse mode, FALSE to
switch off positive pulse mode.
Returns the frequency of the updates in positive pulse mode.
setPosFrequency
( int
freq );
Sets the frequency of the updates in positive pulse mode. If the
frequency is negative, it is set to 0.
bool getUseNegPulseMode
( );
Returns TRUE if negative pulse mode is active, FALSE if negative
pulse mode is not active.
setUseNegPulseMode
( bool
flag );
Set "flag" to TRUE to switch on negative pulse mode, FALSE to
switch off negative pulse mode.
Returns the frequency of the updates in negative pulse mode.
setNegFrequency
( int
freq );
Sets the frequency of the updates in negative pulse mode. If the
frequency is negative, it is set to 0.
Returns whether or not pulses from this sensor are inverted.
Set "flag" to TRUE to invert the responses of this sensor, set to
FALSE to keep the normal response.
Controllers have the following methods:
Actuator* getActuator
( char*
name , );
Returns the actuator with "name".
Returns a python list of all connected Actuators.
Sensor* getSensor
( char*
name , );
Returns the Sensor with "name".
Returns a python list of all connected Sensors.
The GameObjects you got with getOwner() provide the following
methods.
applyImpulse
( list
[x,y,z] , );
Apply impulse to the gameObject (N*s).
Disables the rigid body dynamics for the gameObject.
Enables the rigid body dynamics for the gameObject.
setVisible
( int
visible );
Sets the GameObject to visible (int visible=1) or invisible (int
visible=0), this state is true until the next frame-draw. Use
"enableVisibility( bool usevisibility );" from the Rasterizer
Module to make all objects invisible.
Sets the position of the gameObject according to the list of the X,
Y and Z coordinate.
pylist [x,y,z] getPosition
( );
Gets the position of the gameObject as list of the X, Y and Z
coordinate.
pylist [x,y,z] getLinearVelocity
( );
Returns a list with the X, Y and Z component of the linear
velocity. The speed is in Blender units per second.
pylist [x,y,z] getVelocity
( );
Returns a list with the X, Y and Z component of the velocity. The
speed is in Blenderunits/second.
Returns the mass of the GameObject.
pylist [x,y,z] getReactionForce
( );
Returns a Python list of three elements.
Suspends the dynamic calculation in the game engine.
Suspends the dynamic calculation in the game engine.