Use a python script to control sensors and actuators in the Blender 3D game engine
Python Script Tutorial
The Blender 3D and Blender 3D game engine tutorials were created as a series of step by step instructions to help you create computer games. Casual video games, First Person Shooter, role playing games, racing simulations and more. Use the Blender 3D tutorials to model and program your own three-dimensional world and then play on your computer.