Help with car sound (logic bricks or python)

Ok, I’ve searched the forums for sound templates, scripts and logic brick set-ups for creating a working solution for vehicle sound controls. And have tried to get it/them to work with what I’ve put together so far… absolutely no luck. I hate being a newbie bozo and swear to God I’ll rectify this when I’m done with this test project!

I need help creating a python or logic brick set-up for a vehicle… I was hoping simply to have an idle sound (that’s on when the game starts) switch to a throttle sound with a forward key press and back to idle with a brake key press. I’m using the Bueraki vehicle scripts in 2.49b and have attached a WIP.
Thanks for your help.

The script is working with Bueraki vehicle scripts. You need to change the sensor name in the script from “gas” to “acc”. Don’t forget to connect the sound actuator with the name “Sound” to the script.

Ok, I’ll try it again. I’d change the sensor name in the script etc, but maybe I missed something.
Thanks

It might also not work because of which version of blender you are using. It wouldn’t work for blender 2.5

I’m using 2.49b… set it up as mentioned above and it played the .wav in a real random manner with each key press. was hoping there would be some simple logic brick solution like having the idle.wav turn off when the gas.wav (acc) in on?

To get it work with Blender 2.5x you only need to insert in the folowing line to the top of the script.

import GameLogic

works with Blender 2.49b and Blender 2.5x
or

from bge import logic as GameLogic

works with Blender 2.5x
or

import bge
GameLogic = bge.logic

works with Blender 2.5x

Thanks… will try it.