Blender Game Engine Overview | Page 3

Blender org
from -10000.000 to 10000.000. It is useful for
precision values.
Integer Uses integers (whole numbers) as value, between -10000 and 10000. Useful for count ing things
such as ammunition where decimals are unnecessary.
String Takes text as value. Can store 128 characters.
Boolean Boolean variable, has two values true or false. This is useful for things that has only two modes,
like a light switch.


Using Properties
The logic editor has both a Property Sensor type and a Property Act uator type.
Property Sensor
Property sensor has four modes:

Equal
Triggers a positive pulse when the property value matches the value in the sensor.
Not Equal
Triggers a positive pulse when the property value differs from the value in the sensor.
Interval
Triggers a positive pulse when the value of the property is b etween the Min and Max values in the
sensor.
For “more than”, enter the property name in the Max field and the lowest number for triggering in
theMin field.
For “less than”, enter the property name in the Min field and the maximum value in the Max field.
Names of other properties can also be entered to compare properti es.
Changed
Triggers a positive pulse when the value of the property changes.


See Sensors for more general information on the use of sensors and Property Sensor for more detailed
information about the Property sensor.

Property Actuator
The Property actuator has four modes:
Assign
Gives the the value in the Value field to the property in the Prop field. Can only be a property of
the same object.
Add
Increases the value of the property, enter a negative value to sub tract. For Bool, a value other 0
(also negative) is counted as True.
Copy
Copies a property from another object to a property of the actuator owner.
Toggle
Switches 0 to 1 and any other number than 0 to 0. Useful for on/off switches. Does not work
with Stringproperties.
See Actuators for more general information on the use of actuators and Property Actuator for more
detailed information about the Property actuator.

Sensors
Sensors are the causes of logic to do anything. This can be a trigger event such as a nearby object, a key
pressed on the keyboard, timed events, etc. When a sensor is t riggered, a positive pulse is sent to all
controllers that are linked to it.

Sensor Viewing Options
Blender sensors can be found in the Logic Panel. At the top of th e Sensors sub-panel, there are four
buttons labeled Sel, Act, Link and State. There is also a menu that is activated by clicking Sensors, the title
of the sensor sub-panel. This is for showing/hiding sensors and is very useful so unneeded sensors can be
hidden and the necessary ones visible and easier to reach. Se nsors are grouped by object with every
selected object appearing in a list and under each object are it's sensors.
The menu labeled Sensors looks like a label but is a menu. It has four options:
Show Objects Expands all objects.
Hide Objects Collapses all objects to just a bar with their name.
Show Sensors Expands all sensors.
Hide Sensors Collapses all sensors to bars with their names.
Both these can be controlled individually on the sensor or object.
It is also possible to filter which sensors are viewed:
Sel Shows all selected objects sensors.
Act Shows only active objects sensors.

Link Shows sensors which have a link to a controller.
State Only sensors connected to a controller of the current state are shown.


General Options


Object before adding a sensor
All objects have two buttons, one which is labeled with their na me, and the other labeled Add.


Object after adding a sensor
The Add menu adds a new sensor to the object. see sensor types



Object with sensors collapsed
The button with the object’s name is for collapsing the object list and hiding its sensors.

Object after deleting all sensors
An
Continue reading on your phone by scaning this QR Code

 / 23
Tip: The current page has been bookmarked automatically. If you wish to continue reading later, just open the Dertz Homepage, and click on the 'continue reading' link at the bottom of the page.