# RandomActuator Class Reference

[GameLogic Index] [GameLogic Hierarchy]

A RandomActuator is a special kind of a general actuator More...

`#include <randomactuator.h>`

Inherits: Actuator

## Public Members

- RandomActuator ()
- ~RandomActuator ()
- PyObject* setSeed (int seed)
- PyObject* getSeed ()
- PyObject* getPara1 ()
- PyObject* getPara2 ()
- PyObject* getDistribution ()
- PyObject* setProperty (char* name)
- PyObject* getProperty (char* name)
- PyObject* setBoolConst (int value)
- PyObject* setBoolUniform ()
- PyObject* setBoolBernouilli (float value)
- PyObject* setIntConst (int value)
- PyObject* setIntUniform (int lower_bound, int upper_bound)
- PyObject* setIntPoisson (float value)
- PyObject* setFloatConst (float value)
- PyObject* setFloatUniform (float lower_bound, float upper_bound)
- PyObject* setFloatNormal (float mean, float standard_deviation)
- PyObject* setFloatNegativeExponential (float half_life)

## Detailed Description

A RandomActuator is a special kind of a general actuator.

## PyObject* setSeed(int seed)

Set the initial seed of the generator. Equal seeds produce equal series. If the seed is 0, the generator will produce the same value on every call.

## PyObject* getSeed()

Returns the initial seed of the generator. Equal seeds produce equal series.

## PyObject* getPara1()

Returns the first parameter of the active distribution. Refer to the documentation of the generator types for the meaning of this value.

## PyObject* getPara2()

Returns the second parameter of the active distribution. Refer to the documentation of the generator types for the meaning of this value.

## PyObject* getDistribution()

Returns the type of the active distribution.

## PyObject* setProperty(char* name)

Set the property to which the random value is assigned. If the generator and property types do not match, the assignment is ignored.

## PyObject* getProperty(char* name)

Return the property to which the random value is assigned. If the generator and property types do not match, the assignment is ignored.

## PyObject* setBoolConst(int value)

Set this generator to produce a constant boolean value.

## PyObject* setBoolUniform()

Set this generator to produce true and false, each with 50% chance of occuring.

## PyObject* setBoolBernouilli(float value)

Return false value * 100% of the time.

## PyObject* setIntConst(int value)

Always return value.

## PyObject* setIntUniform(int lower_bound, int upper_bound)

Return a random integer between lower_bound and upper_bound. The boundaries are included.

## PyObject* setIntPoisson(float value)

Return a Poisson-distributed number. This performs a series of Bernouilli tests with parameter value. It returns the number of tries needed to achieve succes.

## PyObject* setFloatConst(float value)

Always return value.

## PyObject* setFloatUniform(float lower_bound, float upper_bound)

Return a random integer between lower_bound and upper_bound.

## PyObject* setFloatNormal(float mean, float standard_deviation)

Return normal-distributed numbers. The average is mean, and the deviation from the mean is characterized by standard_deviation.

## PyObject* setFloatNegativeExponential(float half_life)

Return negative-exponentially distributed numbers. The half-life 'time' is characterized by half_life.

- Author: Jan Walter
- Documentation generated by jan@nvidea on Thu Dec 21 14:04:43 CET 2000

K doc