Register    Login    Forum    FAQ    PinSimDB.org

Board index » Resources » Tutorials, how-to's, bug report and docs




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Mode completion scripting question - RESOLVED
 Post Posted: Wed Jul 10, 2013 8:39 pm 
Offline

Joined: Fri Apr 19, 2013 11:00 pm
Posts: 39
Hey guys,
Working on a new table and I'm running into a mode completion issue. My first 3 modes work flawlessly. I then have a 4th mode which is triggered by hitting a lock and getting captured in that lock. The 4th mode needs to set the table back to the original state once the ball is lost either by being destroyed while captured in the lock or draining after the ball is freed from the lock.
The problem I'm having is once the ball is captured in the lock (marking mode 4 completion) and is then lost by drain or destroyed, once the table resets (as it should back to the beginning and the next ball is created in the plunger lane) when that next ball is lost, no new ball is kicked out into the plunger lane to continue playing. The flippers work, but nothing else happens and I have to exit the table.
I can't seem to get this one figured out. . . any ideas why after mode 4 is activated and the ball drains, the next ball that is created and drains is the last ball to be created even though the game is not over?
Thanks for any input you can provide.


Last edited by saecrow on Thu Jul 11, 2013 6:43 pm, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Mode completion scripting question
 Post Posted: Thu Jul 11, 2013 12:53 am 
Offline

Joined: Tue Jun 25, 2013 12:56 pm
Posts: 18
Probably. For some reason the table thinks there is still a ball in play (most likely a locked ball.

Without seeing your code I can't say this for sure nor provide a solution. If you want me to have a look you can always provide me with a link via PM

But most Likely something like

When ball is locked

ballsInPlay = ballsInPlay - 1
BallsInLock = BallsInLock + 1

Will solve your problem

_________________
Personal Web space Dedicated to FP
http://users.telenet.be/Napivo/
Programmer by trade.


Top 
 Profile  
 
 Post subject: Re: Mode completion scripting question
 Post Posted: Thu Jul 11, 2013 8:36 am 
Offline

Joined: Fri Apr 05, 2013 2:33 pm
Posts: 146
Location: Brazil
BTW, is there any debug tool one could use to test FP scripts ? The debug window in FP is good, but at times you really would like to be able to run the script step by step to find a bug.


Top 
 Profile  
 
 Post subject: Re: Mode completion scripting question
 Post Posted: Thu Jul 11, 2013 10:35 am 
Offline

Joined: Fri Apr 19, 2013 11:00 pm
Posts: 39
Napivo wrote:
Probably. For some reason the table thinks there is still a ball in play (most likely a locked ball.

Without seeing your code I can't say this for sure nor provide a solution. If you want me to have a look you can always provide me with a link via PM

But most Likely something like

When ball is locked

ballsInPlay = ballsInPlay - 1
BallsInLock = BallsInLock + 1

Will solve your problem


Thanks Napivo.... there's only one lock and one ball and if the ball is destroyed while in the lock (after a timer expires) I have the EndOf Ball in the timer_expired code so the current ball sequence is ended and next player (if multiplayer) or next ball same player begins if timer expires before ball is freed. The only other option is for the ball to drain once its released from the lock before the timer expires which triggers the normal drain routine. In either of these cases, a new ball is created, but when that one drains no new ball is created.
I know it's tough without seeing, I'll try and get the code over to you shortly.


Top 
 Profile  
 
 Post subject: Re: Mode completion scripting question
 Post Posted: Thu Jul 11, 2013 1:39 pm 
Offline

Joined: Fri Apr 05, 2013 2:33 pm
Posts: 146
Location: Brazil
Maybe you could create a short video showing the problem, as well as the code, it is really difficult to understand whats happening without seeing your table.


Top 
 Profile  
 
 Post subject: Re: Mode completion scripting question - RESOLVED
 Post Posted: Thu Jul 11, 2013 6:48 pm 
Offline

Joined: Fri Apr 19, 2013 11:00 pm
Posts: 39
Thanks guys. . . this is resolved.
Napivo, you nailed it - I was able to identify the issue only happened when the ball was destroyed in the lock and even though I had the EndOfBall called, closer inspection showed this doesn't decrement the BallsOnPlayfield, so while the next ball was created in the plunger lane, the table thought there were 2 balls, so when the "real" ball drained, the "ghost" ball was "still on the playfield". Once I added the line BallsOnPlayfield = BallsOnPlayfield - 1 to the code where the ball is destroyed by the kicker, all works as it should.
Thank you!!!


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

Board index » Resources » Tutorials, how-to's, bug report and docs


Who is online

Users browsing this forum: No registered users and 5 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: