' =============================================================================
DOF_enabled = False 'Enable/Disable DOF for cabinet users with feedback and lighting
' if DOF is not installed, then this will automatically be disabled
'
PUP_SSF_enabled = True 'Enable/Disable PUP SSF (Surround and Automatic ball and table sounds)
' needs Pinup Player and FP_PUP_SSF PuP-Pack installed in up video folder
' ============================================================================
' Thanks To Terry Red , Rav and The Rest At Pinball Nirvana (
www.pinballnirvana.com) for the below code
' Define Custom Balls
Dim BallColor
Dim GreenBall
Dim YellowBall
Dim RedBall
Dim BlueBall
' # Custom Balls Script TERRY RED - P.S - Thank You ###############
Function CreateCustomBall ( Source, BallName, Radius, Mass, Opacity )
xBAM. BallRadius = Radius
xBAM.BallMass=7900'DEFAULT 8000
xBAM. BallOpacity = Opacity
Dim bi
Set bi = xBAM.BallManager.CreatCustomBall(BallName)
Source.CreateBall bi. Red, bi. Green, bi. Blue, bi. BallNumber
AddDebugText "["&xBAM.BallID&"]"
Dim ball
Set ball = xBAM.BallCloseTo(Source.X, Source.Y)
'Set CreateCustomBall = ball
End Function
' ------ DEFINE BALL TEXTURES -------
Dim GreenBall_452_ColorMap
Set GreenBall_452_ColorMap = xBAM.GetTexture("GreenBall_452_ColorMap")
GreenBall_452_ColorMap.normalMap = "GreenBall_452_NormalMap"
GreenBall_452_ColorMap.normalMapScale = -2
GreenBall_452_ColorMap.SetSpecularColor 0, 0, 0
Dim YellowBall_452_ColorMap
Set YellowBall_452_ColorMap = xBAM.GetTexture("YellowBall_452_ColorMap")
YellowBall_452_ColorMap.normalMap = "YellowBall_452_NormalMap"
YellowBall_452_ColorMap.normalMapScale = -1
YellowBall_452_ColorMap.SetSpecularColor 0, 60, -1.65
Dim RedBall_452_ColorMap
Set RedBall_452_ColorMap = xBAM.GetTexture("RedBall_452_ColorMap")
RedBall_452_ColorMap.normalMap = "RedBall_452_NormalMap"
RedBall_452_ColorMap.normalMapScale = -1
RedBall_452_ColorMap.SetSpecularColor 0, 0, 0
Dim BlueBall_452_ColorMap
Set BlueBall_452_ColorMap = xBAM.GetTexture("BlueBall_452_ColorMap")
BlueBall_452_ColorMap.normalMap = "BlueBall_452_NormalMap"
BlueBall_452_ColorMap.normalMapScale = -1
BlueBall_452_ColorMap.SetSpecularColor 0, 0, 0
GreenBall = xBAM.BallManager.DefineCustomBall (255, 255, 255, "GreenBall_452_ColorMap", "GreenBall_334", "GreenBall_269")
YellowBall = xBAM.BallManager.DefineCustomBall (255, 255, 255, "YellowBall_452_ColorMap", "YellowBall_334", "YellowBall_269")
RedBall = xBAM.BallManager.DefineCustomBall (255, 255, 255, "RedBall_452_ColorMap", "RedBall_334", "RedBall_269")
BlueBall = xBAM.BallManager.DefineCustomBall (255, 255, 255, "BlueBall_452_ColorMap", "BlueBall_334", "BlueBall_269")
' # PUP Plug-in: Texture Swaps and Animations ##################
' - used on all objects where the normal BAM texture swapping commands won't work (like ornaments, ramps, etc)
' - can be used to swap textures with pretty much anything
' - replacement textures that are not used on any surface or object must be added to an Image Sequence (so BAM can "see" it)
' - note, that EVERY texture you are swapping (to and from) needs to use GetTextureId to fetch the texture
' - then you simply just need to use the ReplaceTexture command to replace each texture
' - keep in mind... this will replace the texture on ALL objects / surfaces that use it, so you may need uniquely named textures
' - you must SAVE the table after adding new textures before running the table or this may not work!
' - any changes made to the source texture (brightness, colour, etc) will effect the swapped out texture!
' **** Initialize the pup plug-in ****
Dim PuP_Plug_Tex
Set PuP_Plug_Tex = xBAM.Get("PuPPlugin")
If PuP_Plug_Tex Is Nothing Then
AddDebugText "PuP Plugin is missing"
Else
AddDebugText "PuP Plugin has started"
End if
You can make a key press trigger the ball change
' if keycode = xxxxKey then defaultball = blueball