Hello. under drivetrain.lua there is a line of code called rpm limiter and has this string of code underneath it if engAV > engine.maxAV then torque = 0 end what can i add/change to subtract 100RPM every time the engine hits for example 8000RPM to create a rev limiter sound? Thanks, Liam.
For the sound: if Sounds == nil then Sounds = {} end if Sounds[1] == nil then Sounds[1] = {} end rev_limiter_sound = gameEngine:createSFXSource(path/to/sound.wav, " AudioLoop2D", ''rofile_name", false) Make sure the sound is mono, if you want the sound 3D use :AudioDefaultLoop3D and attach it to a node if its 3D using : obj:attachSFXNode(rev_limiter_sound, node_id) You can scavage some code to get a node from the engine and make the sound come out from there. Sounds[1]["profile_name"] = {obj = rev_limiter_sound, lastVol = 0, lastPitch = 0} az = Sounds[1]["profile_name"] obj:setVolume(az.obj, 0) --use this line but set the volume to 1 whenever you want it to make the rev limiter sound (its gonna loop over and over until you set the volume to 0) For the rev limiter try this although im not sure: if engAV > engine.maxAV then engAv = engAv - 100 playRevLimiterSound(true) -- i assume you'll create a function to play the rev limiter sound end
I replied to you m8, check your inbox. @TheStatPow That may work, but: if engAV > engine.maxAV then torque = 0 engAV = engAV - 100 end also works, and it's much simpler