From BlenderWiki

Jump to: navigation, search

When loading the logic panel for the first time, by either pressing F7KEY or selecting the logic panel button Image:GM_Selecting_the_Game_Logic_Pannel.png, you will see something similar to the image below.

Float

To give you a better understanding of the logic panel we, have expanded some of the menus and numbered them in the image below. We will look at each section individually as number in the image below.

Float

[edit] Associated Object(s)

Logic in the Blender game engine is attached to Objects. The Objects are listed by their name and appear in the logic window when they are selected, e.g. A Cube that is selected in the 3D window. This can be an individual object as in the picture above or you can select multiple objects as in the picture on the right.


Objects logic is only visible when the object(s) associated with that logic are selected.

[edit] Actors

Actors define an object as either passive, such as world/environment objects, things that are unlikely to interact or move such as walls or floors. These are generally unmovable objects in the game that are not affected by gravity.


Alternatively they are defined as actors, objects which can interact with other object. Actors can be given a variety of setting such as gravity, mass, ghost, etc.


A more in-depth look at this is available on the page Actors

[edit] Properties

Properties are like variables in other programming languages. You can associate any number to an object. Each can be give unique names and type. They are useful for storing extra information, such as the number of bullets left in a gun or objects in an inventory.


For a more in-depth look, see Properties

[edit] 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 triggered, a pulse is sent to all linked controllers.


For a more in-depth look, see Sensors

[edit] Controllers

Controllers are there to allow you to decide on how multiple sensors interact with one another or weather to switch over to a Python script. If it doesn't switch over to a python script and all the sensors are valid, e.g. you pressed the fire key on the keyboard and you have bullets in you gun, then an Actuator is triggered.


For a more in-depth look, see Controllers

[edit] Actuators

The actuator affects the object or game in some way. This is were things such as motion, sound, properties, objects, etc. will change. These changers can be in other objects, physics, properties or cause trigger events for other logic bricks.


For a more in-depth look, see Actuators

[edit] Links

Links (7a) are the direction of logical flow between objects. Link lines are drawn by LMM dragging from one link node (7b) to another. Links can only be drawn from Sensors to Controllers or Controllers to Actuators. Sending nodes (found on the right-hand side of Sensors and Controllers) can send to multiple reception nodes (found on the left-hand side of Controllers and Actuators). Reception nodes can like wise receive multiple links.


You cannot directly link Sensors to Actuators. Actuators cannot be linked back to Sensors. If you desire to cause a Sensor to activate after an Actuator has completed, you could add a Property change to an object, then setup a sensor that checks for that property change.