900hasse / FS22_READynamicDirt

Farming Simulator 22, Dynamic Dirt
28 stars 4 forks source link

Question: Distant Motor Sound another script #5

Open s4t4n opened 1 year ago

s4t4n commented 1 year ago

Hello Hans,

unfortunately there is no repository of Distant Motor Sound here, so I'll just write here. I'm working on a script to reduce the volume of the reversing beep. Unfortunately I fail at that. With spec.samples.reverseDrive = nil I switch off the beep sound completely. But if I want to change the volume now, I always get a "nil" back. I've tried something like this: setSampleVolume(spec.samples.reverseDrive, 0.4 * self:getCurrentSampleVolume(sample)) which I got from your script.. but I can't get any further.. maybe you have an idea?

Many greetings Sebastian

900hasse commented 1 year ago

Hello!

How do you know what “sample” is?

Need to know in what environment to code is called in?

“setSampleVolume(spec.samples.reverseDrive, 0.4 * self:getCurrentSampleVolume(sample))”

This line sets the variable to nil, to compare if value is equal you need “==” .

“spec.samples.reverseDrive = nil”

//Hans

Från: Sebastian @.> Skickat: den 30 november 2022 18:25 Till: 900hasse/FS22_READynamicDirt @.> Kopia: Subscribed @.***> Ämne: [900hasse/FS22_READynamicDirt] Question: Distant Motor Sound another script (Issue #5)

Hello Hans,

unfortunately there is no repository of Distant Motor Sound here, so I'll just write here. I'm working on a script to reduce the volume of the reversing beep. Unfortunately I fail at that. With spec.samples.reverseDrive = nil I switch off the beep sound completely. But if I want to change the volume now, I always get a "nil" back. I've tried something like this: setSampleVolume(spec.samples.reverseDrive, 0.4 * self:getCurrentSampleVolume(sample)) which I got from your script.. but I can't get any further.. maybe you have an idea?

Many greetings Sebastian

— Reply to this email directly, view it on GitHub https://github.com/900hasse/FS22_READynamicDirt/issues/5 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AXLRS65MCHHG5N3MFOIC32DWK6EVPANCNFSM6AAAAAASP37TU4 . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AXLRS62ZUV7BWI7EW6XZHH3WK6EVPA5CNFSM6AAAAAASP37TU6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFPHROCY.gif Message ID: @. @.> >

s4t4n commented 1 year ago

every reverse beepsound should be integrade to decrease volume. the self:getCurrentSampleVolume.. I don't need it realy.. it was just an example and tryout.

https://github.com/s4t4n/FS22_LowerReverseBeepVol/blob/master/LowerReverseBeepVol.lua