Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » FAQ & Help




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: code of each ball
 Post Posted: Sat Jul 20, 2019 1:41 pm 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
I'll explain better....I try.

three balls for to play......so,nvBallsPerGame = 3

to each ball remaining, what is his code?

ball 1= if BallsRemaining(CurrentPlayer)..here what then?

ball 2= if BallsRemaining(CurrentPlayer)..here what then?

ball 3= if BallsRemaining(CurrentPlayer)..here what then?

in practice, every different ball has to change a different score in a subrootine


Top 
 Profile  
 
 Post subject: Re: code of each ball
 Post Posted: Sat Jul 20, 2019 3:36 pm 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
ok, I think I have solved ;)
first ball
If (BallsRemaining(CurrentPlayer) = 3) Then
second ball
If (BallsRemaining(CurrentPlayer) = 2) Then
third
If (BallsRemaining(CurrentPlayer) = 1) Then


Top 
 Profile  
 
 Post subject: Re: code of each ball
 Post Posted: Tue Jul 23, 2019 2:28 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2823
Location: Ontario, Canada
Yep some table developers prefer Current Ball instead of Balls remaining(CurrentPlayer)

So we need to add a math conversion code:

Code:
Dim Ball
Ball = nvBallsPerGame - BallsRemaining(CurrentPlayer)


Top 
 Profile  
 
 Post subject: Re: code of each ball
 Post Posted: Wed Jul 24, 2019 7:19 pm 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
Gimli wrote:
Yep some table developers prefer Current Ball instead of Balls remaining(CurrentPlayer)

So we need to add a math conversion code:

Code:
Dim Ball
Ball = nvBallsPerGame - BallsRemaining(CurrentPlayer)


ok...thanks for answering....so

so just replace these
If (BallsRemaining(CurrentPlayer) = 3) Then
second ball
If (BallsRemaining(CurrentPlayer) = 2) Then
third
If (BallsRemaining(CurrentPlayer) = 1) Then

with this?no number?
Ball = nvBallsPerGame - BallsRemaining(CurrentPlayer)

ok...and if I this condition
Code:
If (BallsRemaining(CurrentPlayer) = 3)or (BallsRemaining(CurrentPlayer) = 2)  Then
XlightInPlay.State=BulbOn
End if
If (BallsRemaining(CurrentPlayer) = 1)  Then
SkillShotOrExtraballRamdom
End if
End Sub


how it would be done?


Top 
 Profile  
 
 Post subject: Re: code of each ball
 Post Posted: Fri Jul 26, 2019 12:34 am 
Offline
User avatar

Joined: Mon Aug 15, 2011 10:02 am
Posts: 1886
Location: Argentina
What hes saying is that you can replace

BallsRemaining(CurrentPlayer) = 3

for

Dim Ball
Ball = nvBallsPerGame - BallsRemaining(CurrentPlayer)
Ball = 1

This will be the ball number 1



Dim Ball
Ball = nvBallsPerGame - BallsRemaining(CurrentPlayer)
Ball = 2

This will be the ball number 2



Dim Ball
Ball = nvBallsPerGame - BallsRemaining(CurrentPlayer)
Ball = 3

This will be the ball number 3




and in your example

Code:
Sub something
Dim Ball
Ball = nvBallsPerGame - BallsRemaining(CurrentPlayer)
If (Ball = 1) or (Ball= 2)  Then
XlightInPlay.State=BulbOn
End if
If (Ball = 3)  Then
SkillShotOrExtraballRamdom
End if
End Sub



Top 
 Profile  
 
 Post subject: Re: code of each ball
 Post Posted: Sat Jul 27, 2019 8:24 pm 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
thanks francisco, very clear :D


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Future Pinball » FAQ & Help


Who is online

Users browsing this forum: No registered users and 4 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: