ok. i figured it out. a list of things i have changed in my script
- removed explosions because ai was going nuts
- added my own backfire sounds
-
- 13 different sounds
-
- randomized volume
- synced backfire size with backfire loudness
- sound becomes quieter the further away another player is (also plays together with the randomized volume of the bangs)
what i will do:
-
sync backfire size with its loudnessDONE - add 2D effects to the sound depending on where the bangs are in relation to the player
current bugs (which i will also resolve):
sound is serverside played to all players in a given radius but i need to lower the volume and maybe even do some effects to it the further away a player is. At the moment it sounds for everyone in the radius the same, which was not the case with engine-native explosions as the engine knows how distant sounds should sound like.some cars have 4 exhaust pipes coded in but actually use just 1 or 2 (probably only affects addon cars). Those cars have the backfire in the middle of the car so we need to check the “bones” of (well, probably) exhaust 1 and see of the other bones are in a certain distance to eachother. if one or more exceed the limit, they should not be used. there maybe a high error rate because some exhausts are Y pipes and actually have some distance between them. we could do a hardcoded list of cars though where we specify the bones… idk yet.
ill share my code with @T.Silence once i figured that out. Here is a video of what to expect: