Graphics Reference
In-Depth Information
Figure 15-2 Logic properties area
The leftmost portion of this panel is where you'll deal with setting properties later on in this chapter.
The remaining portion of the Logic buttons area is devoted to the logic bricks proper. Logic bricks fall into
three distinct types, which are organized in columns from left to right. The logic brick types are as follows:
Sensors The logic bricks in the leftmost column are sensors. Sensor logic bricks handle the cause side of the
game logic. Sensors are defined to look for specific triggers for events.
Controllers The middle column is where the controllers reside. Controllers connect sensors to actuators. Al-
though in the simplest cases they may initially seem superfluous, controllers are the heart of the BGE game
logic.TheybehaveasBooleanlogicgateswithmultiplesensorinputs.IncaseswherePythonscriptsareused
in the BGE, the scripts themselves take on the role of controllers.
Actuators The logic bricks on the right are actuators. Actuators are the logic bricks that make things happen
as a result of the sensors connected with them.
Making the Character Walk
To set up the basic walking motion of the character, you'll use all three of these logic brick types. To do this,
follow these steps:
1. In the Sensors column, add a new sensor to the Armature object by selecting the Armature in Object
Mode in the 3D viewport, then clicking the Add Sensor menu beside the Armature tag in the Logic Ed-
itor. This tag appears in the area only if the Armature object is selected in the 3D window. When you do
this, you will see the choices available for sensor types. Choose Keyboard here, as shown in Figure 15-3 .
The Keyboard sensor brick is shown in Figure 15-4 . The text field to the right of the drop-down menu
is where you can give the logic brick a name. This can be helpful to keep things orderly, but the name is
optional and arbitrary.
 
 
 
Search WWH ::




Custom Search