I have explore BGE for a long time.But I only know about how to use and,python and nand controller.Can anybody help me about how to use or,xor,nor,xnor and expression controller.
Many thanks for any answers
This question can be answered by reading the Blender manual, section Game Engine by clicking here.
But as I'm answering and not commenting, I'll give an answer.
Activates all connected actuators when all connected sensors are active.
Activates all connected actuators when none connected sensors are active.
Activates all connected actuators when one or more (or all) connected sensors are active.
Activates all connected actuators when one or more (or all) connected sensors are not active.
Activates all connected actuators when one, and only one connected sensor is active.
Activates all connected actuators when one, and only one connected sensor is not active.
Activates all connected actuators when the evaluated expression is true. A remark about this one: this controller is (after Python) the most powerful one, as you can evaluate complex expressions, which could demand several sensors, on a single line.
On Expression controller you can:
sensor1 AND sensor2 OR sensor1 AND sensor3.
property > 0 OR property < 10.
I seriously recommend you to learn Python, but if you don't, learning the Expression controller can help you in making complex logic while avoids 'spaghetti code' on logic bricks.
As the name says, executes Python code. However, there's two modes: Script and Module.
Script mode runs a Blender text block. Using this mode is highly disencouraged, as it is pretty slow (as Python compiles it to bytecode each frame it runs) and harder to maintain (as it belongs to the blend file). This mode is only kept for backward compatibility.
Module runs a Python function. This function can be present inside a Blender text block or an external Python script (in both cases, the scripts must end with the extension
.py). The field of the controller is a path to the function, which could follow the pattern
folder.subfolder.script.function, or any other pattern which fits your Python script.