How do I enable "PinMechSounds" in FizXLite?

Slippery Jim

Pinball Wizard
Joined
Dec 13, 2018
Messages
87
Reaction score
33
Points
25
Favorite Pinball Machine
Stern Dracula
Ive got fizxlite working on my machine, and the ball rolling sounds from Fizx working as well, I have imported all the "Fleep" mech sounds in the Fleep '1 - Required - Table Sounds (add to Sound Manager)' folder but whenever I try to use the sounds using the PinmechSound command it gives an error "Variable is undefined "PinMechSound" "

What do I need to add to get the PinMechSound command working?
 
I don't know what is or is not in FizX Lite but in normal FizX, import the sounds and that's pretty much it :)
FizX takes care of the mech sounds for you based on the material the ball hits (rubber, wood, metal...)

And from the AIO table:

' ***** Force Ball Hit Sounds on a table item *****

' If you want to "force" a table item to play a specific FizX generated "hit" sound
' (no matter what it's material / object type is), then rename the item in the
' FP Editor to what is shown below in "Table Item Names".

' -------------------------------------------------------------------
' Ball Hit Sound | Table Item Names
' -------------------------------------------------------------------
' Rubber Post | RubberPost1, RubberPost2, RubberPost3 etc
' Rubber Bands | RubberBand1, RubberBand2, RubberBand3 etc
' Drop Target wall | DT1, DT2, DT3 etc
' Metals | Metal1, Metal2, Metal3 etc
' Wood | Wood1, Wood2, Wood3 etc
' Plastics | Plastic1, Plastic2, Plastic3 etc
' Apron walls | Apron1, Apron2, Apron3 etc
 
Ive got fizxlite working on my machine, and the ball rolling sounds from Fizx working as well, I have imported all the "Fleep" mech sounds in the Fleep '1 - Required - Table Sounds (add to Sound Manager)' folder but whenever I try to use the sounds using the PinmechSound command it gives an error "Variable is undefined "PinMechSound" "

What do I need to add to get the PinMechSound command working?

Fix-Lite has no support for DOF, or PUP SSF, which is what PinMechSound is meant for (while also supporting FP Sounds).

PinMechSound is the code I added to the AIO Example Table. If you want to use PinMechSound and all its functions.... you need to use the AIO Example table's code.
 
On FizX Lite, I converted the PinMechSound code that is in the AIO to a simple PlaySound code that FP recognizes. It is not too hard to do. Most of the coding I do is not very complex but is sometimes tedious. The reason I changed it is FizX Lite does not use PUP SSF so there is no need for the PinMechSound code. Have a look at the example below. It would probably be easier to review the code if you copy and past it into the script of any table so you can see the colors.

AIO code with PinMechSound
Code:
Sub FizXPlasticHitEvent()
    if BallSpeed_Volume_enabled = true then
        If xBAM.Ball.HitSpeed <= 1000 then PinMechSound ("mech_Plastic_Hit_" &Int(Rnd*3)+1), "ball", (( xBAM.Ball.HitSpeed / 1000 ) * BallSpeed_Volume_Amplifier) * Plastic_Hit_Vol, , , "plastic"
        If xBAM.Ball.HitSpeed > 1000 then PinMechSound ("mech_Plastic_Hit_" &Int(Rnd*3)+1), "ball", Plastic_Hit_Vol, , , "plastic"
    else
        PinMechSound ("mech_Plastic_Hit_" &Int(Rnd*3)+1), "ball", Plastic_Hit_Vol, , , "plastic"
    end if
    'AddDebugText "HitSpeed" & xBAM.Ball.HitSpeed
End Sub

FizX Lite code with PlaySound
Code:
Sub FizXPlasticHitEvent()
    if BallSpeed_Volume_enabled = true then
        If xBAM.Ball.HitSpeed <= 1000 then PlaySound ("mech_Plastic_Hit_" &Int(Rnd*3)+1), (( xBAM.Ball.HitSpeed / 1000 ) * BallSpeed_Volume_Amplifier) * Plastic_Hit_Vol
        If xBAM.Ball.HitSpeed > 1000 then PlaySound ("mech_Plastic_Hit_" &Int(Rnd*3)+1), Plastic_Hit_Vol
    else
        PlaySound ("mech_Plastic_Hit_" &Int(Rnd*3)+1), Plastic_Hit_Vol
    end if
    'AddDebugText "HitSpeed" & xBAM.Ball.HitSpeed
End Sub
 
Last edited:
Ive got fizxlite working on my machine, and the ball rolling sounds from Fizx working as well, I have imported all the "Fleep" mech sounds in the Fleep '1 - Required - Table Sounds (add to Sound Manager)' folder but whenever I try to use the sounds using the PinmechSound command it gives an error "Variable is undefined "PinMechSound" "

What do I need to add to get the PinMechSound command working?

Please post a copy of what you come up with. JLou and I are thinking about a change to add the code to FisX Lite and this would save us a few steps.
 
Please post a copy of what you come up with. JLou and I are thinking about a change to add the code to FisX Lite and this would save us a few steps.
do you mean the code to get it to work? If so:
 

Attachments

  • baallrollingcodeforfizxlite.txt
    8.6 KB · Views: 5
If you're not going to support DOF, or PUP SSF (for ball rolling, etc)... then all references to both and their related code / commands / comments should be removed. Otherwise you're just asking for problems and confusion from anyone who tries to enable them.... or they'll be asking why is it there... how to use it, etc.

Don't mix only portions of PUP / PinMechSound into a table. You will have missing functions, as portions of it are added to the FizX Code from the AIO.... and people will ask why they only have some sounds, etc.
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    maxangelo19 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Dragonslapper has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    royaljet has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tyfox has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Goldtopboy has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    slick267 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    dabreeze has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Spike has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tofa has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Atropine has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    bongo2k5 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Bouly has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Felipefx3 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    djrbx has left the room.
  • F @ freebird1963:
    were do music and sound files go
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    jhbradley has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Conejazo has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Sedulous has left the room.
      Chat Bot Mibs Chat Bot Mibs: Sedulous has left the room.
      Back
      Top