Vehicle Wrapper -- Blender 3D Game Engine


  
pageok

  
12.  Add a Python Controller:  Use Powertrain.py

Car selected

Buttons Window menu >> Logic (F4)
Controllers
Add
Python
Script:  Powertrain.py


 

  
13.  Connect the Keyboard Sensors to the Python Controller

Car selected

Buttons Window menu >> Logic (F4)
Pull wire from brass bumps to brass dimple


   
14.  Switch to State Mask Group 1 

Note:
This tutorial uses State Mask Groups.
State Mask Group 1:  Car Setup  (CarSetup.py)
State Mask Group 2:  Tweak Suspension (Suspension.py)
State Mask Group 3:  Car controls.  (Powertrain.py)

Car selected

Buttons Window menu >> Logic (F4)
Sensors
Enable State button
Controllers
State GUI:  
State Mask Group 1
Actuators
Enable State button

   
15.  Start Game Engine

Start Game Engine
P key
or
User Preference menu >> Game >> Start Game

 

 
pageok