Vehicle Wrapper -- Blender 3D Game Engine





 
 



Quick Instructions

1.  Add Powertrain.py to the Text Editor
Download:

Text Editor menu >> Text >> Open
Rename Powertrain249.txt to Powertrain.py
 
2.  Powertrain.py --- Brakes  (Line Numbers:  45 - 83)
 
3.  Powertrain.py --- Power  (Line Numbers:  85 - 122)
 
4.  Powertrain.py --- Steering  (Line Numbers:  125 - 153)
 
5.  Switch to State Mask Group 3
Buttons Window menu >> Logic (F4)
Sensors
Enable State button
Controllers
State GUI:  
State Mask Group 3
Actuators
Enable State button
 
6.  Add a Keyboard Sensor to State Mask Group 3:  Name it Gas
Buttons Window menu >> Logic (F4)
Sensors
Add
Keyboard
Name:  Gas
Key:  Uparrow
 
7.  Add a Keyboard Sensor to State Mask Group 3:  Name it Brake
Buttons Window menu >> Logic (F4)
Sensors
Add
Keyboard
Name:  Brake
Key:  Downarrow
 
8.  Add a Keyboard Sensor to State Mask Group 3:  Name it Reverse
Buttons Window menu >> Logic (F4)
Sensors
Add
Keyboard
Name:  Reverse
Key:  Downarrow
Hold1:  Leftshift
 
9.  Add a Keyboard Sensor to State Mask Group 3:  Name it EBrake
Buttons Window menu >> Logic (F4)
Sensors
Add
Keyboard
Name:  EBrake
Key:  Leftctrl
 
10  Add a Keyboard Sensor to State Mask Group 3:  Name it Left
Buttons Window menu >> Logic (F4)
Sensors
Add
Keyboard
Name:  Left
Key:  Leftarrow
 
11.  Add a Keyboard Sensor to State Mask Group 3:  Name it Right
Buttons Window menu >> Logic (F4)
Sensors
Add
Keyboard
Name:  Right
Key:  Rightarrow
 
12.  Add a Python Controller:  Use Powertrain.py
Buttons Window menu >> Logic (F4)
Controllers
Add
Python
Script:  Powertrain.py
 
13.  Connect the Keyboard Sensors to the Python Controller
Buttons Window menu >> Logic (F4)
Pull wire from brass bumps to brass dimple
 
14.  Switch to State Mask Group 1 
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