Jump to content

Recommended Posts

Posted

Hello, 

 

I have found the cause of my previous issue - the stock code for playing sounds utilizes "ActiveBall" which apparently can only be set to one ball at a time. How do I set up positional sound triggering when there are multiple balls in play? I have been searching the internet and looking through other tables, but I cannot seem to find an answer to this issue. 

 

 

Posted

ActiveBall is always the current ball for the most recent event. If you look on some tables for rolling sounds, you’ll see they loop through all balls, and then play sounds at their location taking into account their speed. While ActiveBall is a global variable, you can get all balls on the table using the GetBalls method. Here is the command reference which is super handy to keep open when working on a table. If you want to track them for some reason, you can assign a value to the ball’s UserValue property and then check that value whenever you need to.  https://github.com/vpinball/vpinball/blob/master/docs/CommandReference.txt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...