Well, thanks to our friend, @NitroNimbus , who reminded me and suggested this.
I honestly talked and shared of this,on Dragon keep Here, but didn't open a suitable thread, so here it is:
Copy this code and paste it under the one of the "Dynamic Flippers" because that's where it belongs.....and don't forget to add sound, to your table,
I honestly talked and shared of this,on Dragon keep Here, but didn't open a suitable thread, so here it is:
Copy this code and paste it under the one of the "Dynamic Flippers" because that's where it belongs.....and don't forget to add sound, to your table,
'--------------------------sound bounce
xBAM.CreateAllExt()
Sub LeftFlipper_preHit()
Flipper_preHit(LeftFlipperExt)
End Sub
Sub RightFlipper_preHit()
Flipper_preHit(RightFlipperExt)
End Sub
Const MinBallSpeed = 100
Const MaxBallSpeed = 1000
Sub Flipper_preHit(FlipperExt)
If Not FlipperExt.Hit Then Exit Sub ' we don't expect hit
If FlipperExt.BallVSpeed < MinBallSpeed Then Exit Sub ' ball moves too slow.. no sound
Dim vol
vol = FlipperExt.BallVSpeed / MaxBallSpeed
If vol > 1 Then vol = 1
PlaySound "fx-rubber", vol*2 ' sound volume
AddDebugText "vol = " & vol & ", CP = " & FlipperExt.ContactPoint
End Sub