A few days ago I found images for something I never even thought existed, a payout/trade stimulator bagatelle. The only reason I know this is that I also have an image of the rules lable on back of the game. So, what I'll need, and haven't started trying to figure out, is the ability to place a ball randomly in one of 10 payout cups on the playfield at the start of the game, and if deactivating the other payout cups. Hopefully someone better at coding than I am will have some ideas on how to do this. Screenshot to follow.
John;
Randomization is VERY EASY in VP. I use randomizing on my new "plunger" I have made. It's quite easy really.
TRY THIS:
DIM B (This goes at the TOP of your script with the other DIM array statements)
Sub Random
Randomize
B = Int(Rnd * 10) + 0
The above three bottom lines will randomize a number for the variable of B. B can be used for the "balls" that will be randomized. A DIM array statement (top line) allows B to be used with the randomizer. Make sure at the start of the table script when it first loads that it will go to the Sub Random area. You can name this anything you wish of course, just make sure it goes immediately to that area when your table loads.
Then you can do the following:
DIM B (at top of your script)
Sub Random (The following lines can be added to any lower part of your script)
Randomize
B = Int(Rnd * 10) + 0
If B = 1 Then
Kicker1.CreateBall
Kicker2.Active=False:Kicker3.Active=False:Kicker4.Active=False:Kicker5.Active=False
Kicker6.Active=False:Kicker7.Active=False:Kicker8.Active=False:Kicker9.Active=False:Kicker10.Active=False
End If
If B = 2 Then
Kicker2.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 2)
End If
If B = 3 Then
Kicker3.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 3)
End If
If B = 4 Then
Kicker4.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 4)
End If
If B = 5 Then
Kicker5.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 5)
End If
If B = 6 Then
Kicker6.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 6)
End If
If B = 7 Then
Kicker7.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 7)
End If
If B = 8 Then
Kicker8.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 8 )
End If
If B = 9 Then
Kicker9.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 9)
End If
If B = 10 Then
Kicker10.CreateBall
(add lines to deactivate other kickers here just as above but omit kicker 10)
End If
End Sub
Each time you start a game, have the above randomize the ball in a specific kicker :) and the other kickers are NOT ACTIVE.
Hope this helps you :) It's VERY simple coding and simple enough to understand. Nothing fancy. I know that you know some of this stuff, but thought this may help you.
If I can be of further help, you know my email. I'll answer as soon as I can :)
Will aka druadic
Int is the integer and Rnd is the rounded off number it is equal to. The integer is only allowed to be rounded off (Rnd) to the number assigned to the integer. So when the number is picked randomly, the integer is allowed to only go to the number that it is rounded (Rnd) off to which in the above case is 10. This number can be changed to go lower or higher depending on what you need it for :)