From BlenderWiki
[edit] Lógica del Juego
Game Logic is what causes anything to happen in the game. Dicha lógica está diseñada para proporcionar It is designed to provide a powerful tool to set up the logic through a graphical interface. The blocks (or “bricks”) represents preprogrammed functions which can be tweaked and combined to create the game/application. The system is broken up in three parts: sensors, controllers and actuators. Sensors senses when things happens, such as a collision, a key press, mouse movement. Sensors are linked to controllers, which compare them and activate actuators.
Cuando entre en el panel de Lógica por primera vez, a través de presionar F4 o seleccionando el botón del panel de lógica(
), verá algo similar a la imagen siguiente.
Para proporcionarle una mejor visión del panel de Lógica, hemos expandido algunos de los menús y los hemos númerado en la imagen de abajo. Repasaremos cada sección individualmente en el orden que se indica en la imagen.
[edit] 1 Associated Object(s)
Logic in the Blender game engine is attached to Objects. Objects are listed by their name and appear in the logic window when they are selected. You can select a single object as in the picture above, or you can select multiple objects as in the picture to the right.
An object’s logic is only visible when the object(s) associated with that logic are selected.
[edit] 2 Physics
These settings control how an object behaves in the game. The object type menu defines if an object is a:
- Soft body - Physical, deforms on collision.
- Rigid body - Physical.
- Dynamic - Physical, stays upright.
- Static - Physical, but unaffected by gravity.
- Sensor - For advanced sensoring options (release notes).
- No collision - Nonphysical.
- Occluder - Stops the objects behind them from being sent to the GPU, to save performance (release notes).
The other settings depend of the object type, only the relevant settings will be visible. For some types there is also an Advanced menu with more options. Some settings are per material and can be accessed in by pressing the DYN button in the Material panneau, Material sub-context.
For more physics and culling options see Mist/Stars/Physics tab, in the World sub-context.
A more in-depth look at this is available on the page Actors.
[edit] 3 Properties
Properties are like variables in other programming languages. They are used to save and access data associated with an object. The following types are available:
- Timer - Starts at a defined number and counts up.
- String - Holds text.
- Float - Holds decimal numbers between -10000.000 and 10000.000.
- {{Literal|Int]]eger - Holds integer numbers between -10000 and 10000.
- Bool - Is either True or False.
For a more in-depth look, see Properties.
[edit] 4 Sensors
Sensors begin all logic actions. Sensors “sense” things, 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] 5 Controllers
Controllers handle the logic, evaluating pulses from sensors and sending pulses to actuators in response. The different kinds of controllers are:
- AND - All connected sensors must be positive to send a positive pulse.
- OR - One or more connected sensor has to be positive.
- XOR - Exclusive Or: one, and only one, connected sensor has to be positive.
- NAND - Not And, inverted And controller.
- NOR - Not Or, inverted Or controller.
- XNOR - Exclusive Nor controller.
- Expression - Write your own expression.
- Python - Control the sensor with a python script or module.
For a more in-depth look, see Controllers.
[edit] 6 Actuators
Actuators affect objects or the game in some way. Actuators change motion, sound, properties, objects, etc. These changes can be in other objects, physics, properties or they can cause trigger events for other logic bricks.
For a more in-depth look, see Actuators.
[edit] 7 Links
Links (7a) are the direction of logical flow between objects. Link lines are drawn by LMB
dragging from one link node (7b) to another. Links can only be drawn from Sensors to Controllers or Controllers to Actuators. Sending nodes (the yellow circles 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, use the actuator sensor.
[edit] Subpages








![[]](/skins/blender/open.png)
