How to make retarder sound in A-Chassis bus?

Hello!

I have a question, how do I script a bus using A-Chassis to let it make a sound when the bus brakes? The pitch depends on the speed of the bus. It’s also called a retarder.

An example of a retarder: https://www.youtube.com/watch?v=PqdOInn88MI
It’s the “weeeeeeeee” sound when braking.

Thanks in advance!

2 Likes

While braking play the sound and use a script that reads the vehicles velocity to change the playbackspeed.
How do I achieve this type of engine SFX for my vehicle? - #2 by Scottifly

2 Likes

Thanks! Could you provide everything I need to add, and explain it like I’m 5? Sorry but I’m really bad at scripting lol.

1 Like

Find the section of function code in the A-Chassis script that deals with braking and when that fires you can start to play the retarding sound (nice, I just noticed the filter blocks the word in the preview window so you can tell before posting what’ll be hashtagged!).
When that happens you should run a loop that has the retarding sound in it like I linked. The speed of the bus will control how much the sound changes. Make sure there’s a check in there to make sure you’re still braking (something like while vehicleseat.Throttle == -1 do) and if not then end the loop.

Give it a try first, then copy/paste the code here if it doesn’t work. Make sure to put 3 backticks (```) before and after so it formats properly. We shouldn’t be writing scripts for you, but we can check what you’ve done and suggest corrections.

1 Like

Thanks! I’ll try it tomorrow, as it’s 10pm here lol.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.