Hi Beamers! Quick question, Can an SBEAM be set up to have a sound file play for each gear the vehicle is in? For example, Sound file "A.ogg" plays when the car is at idle, "B.ogg" in Drive, etc. (You get the point...) Thanks, -Mario64iscool2
... I'm looking for an answer, and I'm surprised no one has one for me yet, despite my amount of views on this.
Have some patience. This is not something that the community is likely to know. In theory, it's possible. That's all I can tell you.
To be honest, I view random threads without knowing the problem just as other people do Anyway, back on topic.
rpm in SBEAM is the source, it can be other things than rpm, but exactly what others that is unknown, but one would need to figure out what other than rpm can be used. I doubt that anyone outside the dev team really knows all the possible variables that could be used instead of rpm. You could of course play hacker and just start testing different possibilities, gear, gearbox, gear1 etc. in place of rpm. All that is needed is to figure out what possible string devs would of used for each gear, now if they have built such possibility that is pretty much only way I can see anyone finding out what is really possible. That is unless one of devs pastes all possible variables here and if upcoming 0.9 version changes sound system it would be wasted effort in 1-2 months time, but we can't know that of course, but as devs have mentioned how they need to improve sounds, they have hired sound guy etc. I guess next update has something in store for sounds.
It's possible with a custom lua file. You can make new electrics values and use them as sources for volume or pitch. In this case, each gear (or automatic shifter position?) would have 0 volume when it's not active. It's probably easier to just write the lua file than explain how to do it. How exactly do you want it to work?
I want it to work like in Mario Kart 8. I'm building a Mario Kart, so I'd like to be able to use it's source files.
After watching a couple of videos of it, I still don't know how it's meant to work. Anyway, I tried doing separate sounds for reverse, neutral and forward gears. First, put this in yourvehicle\lua\something.lua Code: local M = {} local function updateGFX(dt) electrics.values['throttleR'] = 0 electrics.values['throttleN'] = 0 electrics.values['throttleD'] = 0 if powertrain.getDevice("gearbox").gearIndex == -1 then electrics.values['throttleR'] = input.throttle*0.5 + 0.5 elseif powertrain.getDevice("gearbox").gearIndex == 0 then electrics.values['throttleN'] = input.throttle*0.5 + 0.5 else electrics.values['throttleD'] = input.throttle*0.5 + 0.5 end end M.updateGFX = updateGFX return M Then this in the .sbeam Code: { "modifiers":[ ["name", "source", "factor", "offset", "min", "max"], ["throttleR", "throttleR", 1, 0, 0, 1], ["throttleN", "throttleN", 1, 0, 0, 1], ["throttleD", "throttleD", 1, 0, 0, 1], ], "sounds":[ ["group", "filename", "profile", "nodeName", "source", "factor", "offset", "minVolume", "minPitch", "maxVolume", "maxPitch", "pitchBlendInStartValue", "pitchBlendInEndValue", "volumeBlendInStartValue", "volumeBlendInEndValue", "volumeBlendOutStartValue", "volumeBlendOutEndValue", "volumeModifiers", "pitchModifiers"], ["default", "engineR.ogg", "AudioDefaultLoop3D", "ENGINE", "rpm", 1, 0, 0, 0, 1.0, 2.000, 0, 10000, 0, 0,10000,10000, ["throttleR"], [] ], ["default", "engineN.ogg", "AudioDefaultLoop3D", "ENGINE", "rpm", 1, 0, 0, 0, 1.0, 2.000, 0, 10000, 0, 0,10000,10000, ["throttleN"], [] ], ["default", "engineD.ogg", "AudioDefaultLoop3D", "ENGINE", "rpm", 1, 0, 0, 0, 1.0, 2.000, 0, 10000, 0, 0,10000,10000, ["throttleD"], [] ], ], } If the car doesn't have the new powertrain, replace powertrain.getDevice("gearbox").gearIndex with drivetrain.gear . Should work, but I'm not sure.