Thanks for the feedback, I see all the code in the script and I had already tried importing ball rolling sounds from Jaws that are plenty loud and they didn't do a thing, also adjusted all ball rolling sounds in the sound manager to 1 on top of making the adjustment in my original post and there are still zero ball rolling sounds. Do you think the file gain is really that low or would this be the last thing to check if the table actually has rolling sounds? I'll look for the timer tomorrow when I boot my cab up, I guess it's still possible 3rdaxis didn't want the rolling sounds enabled. Appreciate the reply
well, my 1st question is
Do the rolling sounds play in the sound manager?
Do they actually have any appreciable volume?
Is the table timer that runs them active? (enabled)
The non VR addams family table has rolling sounds, so i imagine this one does too
but they are very faint, you dont really hear them much, unless you crank the volume and the table isnt really quiet
long enough to hear them with out blowing your ears up
Yes the rolling sounds play "loud" in the sound manager. I'm not sure where to look to see if the timer is active/enabled. I can't add a pic or the .txt file or even a copy of the OneDrive link. Can you figure it out from this copy and paste?
' *********************************************************************
' Supporting Ball & Sound Functions
' *********************************************************************
Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table
Dim tmp
tmp = tableobj.y * 2 / table1.height-1
If tmp > 0 Then
AudioFade = Csng(tmp ^10)
Else
AudioFade = Csng(-((- tmp) ^10) )
End If
End Function
Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table
Dim tmp
tmp = tableobj.x * 2 / table1.width-1
If tmp > 0 Then
AudioPan = Csng(tmp ^10)
Else
AudioPan = Csng(-((- tmp) ^10) )
End If
End Function
Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
Vol = Csng(BallVel(ball) ^2 / 1000)
End Function
Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
Dim tmp
tmp = ball.x * 2 / table1.width-1
If tmp > 0 Then
Pan = Csng(tmp ^10)
Else
Pan = Csng(-((- tmp) ^10) )
End If
End Function
Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
Pitch = BallVel(ball) * 20
End Function
Function BallVel(ball) 'Calculates the ball speed
BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
End Function
Sub PlaySoundAt(soundname, tableobj)
PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj)
End Sub
'*****************************************
' JP's Rolling Sounds + Sliderpoint's Ball Shadows
'*****************************************
Dim BallShadow, ShadowTrigger
BallShadow = Array (BallShadow1,BallShadow2,BallShadow3,BallShadow4)
ShadowTrigger = Array (ShadowTrigger0, ShadowTrigger1, ShadowTrigger2, ShadowTrigger3, ShadowTrigger4, ShadowTrigger5, ShadowTrigger6, ShadowTrigger7, ShadowTrigger8, ShadowTrigger9, ShadowTrigger10)', ShadowTrigger11, ShadowTrigger12)
Const tnob = 4 ' total number of balls
ReDim rolling(tnob)
InitRolling
Sub InitRolling
Dim i
For i = 0 to tnob
rolling(i) = False
Next
End Sub
Sub RollingTimer
Dim BOT, b, a, o, h, sa ' a=adjacent o=opposite h=hypotenuse sa= shadow angle
BOT = GetBalls
' hide shadow + stop ballrolling sounds of deleted balls + stop ballrolling sounds
If UBound(BOT)<(tnob-1) Then
For b = (UBound(BOT) + 1) to (tnob-1)
BallShadow(b).visible = 0
rolling(b) = False
StopSound("fx_ballrolling" & b)
Next
End If
' exit the Sub if no balls on the table
If UBound(BOT) = -1 Then Exit Sub
' render the shadow for each ball
For b = 0 to UBound(BOT)
a = ShadowTrigger(SeeShad).X - BOT(b).X
o = ShadowTrigger(SeeShad).Y - BOT(b).Y
sa = atn(o/a)
If sa < 0 then sa=sa+PI
sa = Int(sa/(PI/180))
If a<0 then a = a*(-1)
If o>0 then sa = sa+180
h = Sqr((a*a)+(o*o))
BallShadow(b).RotZ = sa
BallShadow(b).Size_x = (2362/h)*6 'set at max possible hypotenuse length for table, seems good but can be played with
ballShadow(b).Y = BOT(b).Y
BallShadow(b).X = BOT(b).X
'Play sound for each ball
If BallVel(BOT(b) ) > 1 AND BOT(b).z < 35 Then
rolling(b) = True
PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) )
Else
If rolling(b) = True Then
StopSound("fx_ballrolling" & b)
rolling(b) = False
End If
If Ballshadows = 1 Then
'only show shadows in trigger areas
If BOT(b).Z > 15 AND SeeShad > 0 Then
BallShadow(b).visible = 1
Else
BallShadow(b).visible = 0
End If
Else
BallShadow(b).visible = 0
End If
End If
Next
End Sub
Edited by studlygoorite, 11 May 2021 - 04:42 PM.