Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » FAQ & Help




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Script Help Needed
 Post Posted: Tue Apr 17, 2018 7:47 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 31
Location: Australia
I'm building a table completely from scratch using the built in New Table Template. It's going ok except I have come across two hurdles I just cant seem to fathom, one driving me nuts, the other only minor but I just dont know enough to get either working

Fault 1. The table is using Martin Brunker's 1000-29000 points bonus system with 2x, 3x and 5x multipliers. This works fine at the end of the ball. BUT, I also want the bonus to be "collected" on entry to the "saucer", and for the the bonus score to reset to 1000 points at the end of collection and the multiplier reset to 1x. It's currently doing neither. It counts down the bonus the first time, but not the multiplier count, ie if you have 5000 points and 2x multiplier, it will only count 5000 down and then kicks out the ball, leaving the bonus count at whatever it was before entry to the saucer and the multiplier intact. :(

Fault 2. Adding a credit does not add to the "Credits" total on either DMD on first init


You do not have the required permissions to view the files attached to this post.


Top 
 Profile  
 
 Post subject: Re: Script Help Needed
 Post Posted: Wed Apr 18, 2018 8:21 am 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2081
Location: Ontario, Canada
I'll look at the bonus reset


The Credits is easy , you just have to insert your Credit DMD under any nvCredits + 1 statement
( ie under If (KeyCode = GetKeyCode(InsertCoinKey)) Then
PlaySound "CoinIn"
nvCredits = nvCredits + 1)

Code:
   HUDDMD1.FlushQueue
   HUDDMD1.QueueText "[edge3][x82][y25][f1]CREDITS: "& nvCredits, deNone, 3000, TRUE
   DispDMD1.FlushQueue
   DispDmd1.QueueText "[edge3][x82][y25][f1]CREDITS: "& nvCredits, deNone, 3000, TRUE


Top 
 Profile  
 
 Post subject: Re: Script Help Needed
 Post Posted: Wed Apr 18, 2018 9:14 am 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2081
Location: Ontario, Canada
try this, it's a start....
https://www.dropbox.com/s/hvahcqa9e5eyz ... k.fpt?dl=0

There is a section that crashes for some reason around line 700 that I inactivated.
You can probably fix that.
but the saucer will work now (I plugged it into your end of ball code that you said worked...)
I added a timer called "DropResetTimer" to reset the drop targets after bonus collected.
and I added a Subroutine called "Sub CheckBonus"

Search "Gimli" in code


Top 
 Profile  
 
 Post subject: Re: Script Help Needed
 Post Posted: Wed Apr 18, 2018 5:38 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 31
Location: Australia
what you have done with the credit works fine, thanks. However hitting the fixed target behind the drop targets now counts down the bonus. that was easily fixed. However, when hitting the saucer, the bonus counts down but it no longer kicks out the ball.

I fixed that but I have noticed two problems, one, lets say you have 5x multiplier and 8000 bonus points, the ball is kicked out before bonus collection is completed and it stops collecting bonus as soon as the ball is kicked out, so I need some sort of check to see if bonus is complete before kicking the ball out? The other problem is after the ball is kicked out the last totals bonus light remains on, its reseting the "count" but not the lights


Top 
 Profile  
 
 Post subject: Re: Script Help Needed
 Post Posted: Wed Apr 18, 2018 6:35 pm 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2081
Location: Ontario, Canada
yes all that can be done.

I thought the target behind the drop targets was the "Saucer" but you mean the kicker is the "Saucer"
that should be easy to simply switch the code....
https://www.dropbox.com/s/hvahcqa9e5eyz ... k.fpt?dl=0

part of the problem may be, that " Sub Kicker1_hit routine" was only active if table is tilted...it should be (I change the name of the kicker1 to "Saucer" so we are both talking about the same thing)

Code:
If fpTilted = false Then


I think the bonus light issue is because I inactivated part to the code the was crashing...


Top 
 Profile  
 
 Post subject: Re: Script Help Needed
 Post Posted: Wed Apr 18, 2018 7:44 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 31
Location: Australia
it still kicks out the ball before bonus is fully counted, and the bonus light stops on whatever light was on when the ball was kicked out. I reactivated the code that was causing the crash, but that doesnt fix it either. Interestingly I have never had a crash from that code


Top 
 Profile  
 
 Post subject: Re: Script Help Needed
 Post Posted: Thu Apr 19, 2018 8:59 am 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2081
Location: Ontario, Canada
Ok my dim mind is starting to get what you want....

Take your original test table...

and try this and see if it is doing some of what you want...

Code:
Sub SaucerBonusTimer_Expired()


   If Bonus = 0 And BonusMultiplier(CurrentPlayer) = 1 Then
      SaucerBonusTimer.Enabled = False
      Bonus = 0
      BonusMultiplier(CurrentPlayer) = BonusMultiplierTemp
      'EndOfBallTimer.Interval = 200
      'EndOfBallTimer.Enabled = TRUE
      SaucerBonusBreakTimer.Enabled = True
      Exit Sub
   End If

   If Bonus > 20 Then
      Bb_Bonus(Bonus - 20).State = BulbOff
      AddScore(1000*BonusMultiplier(CurrentPlayer))
      PlayMusic 4, "1000_Points"
      Bonus = Bonus - 1
      If Bonus > 20 Then Bb_Bonus(Bonus - 20).State = BulbOn
   ElseIf Bonus = 20 Then
      Bb_Bonus20.State = BulbOff
      AddScore(1000*BonusMultiplier(CurrentPlayer))
     
      PlayMusic 4, "1000_Points"
      Bonus = Bonus - 1
      Bb_Bonus(10).State = BulbOn
   ElseIf Bonus > 10 And Bonus < 20 then
      Bb_Bonus(Bonus - 10).State = BulbOff
      AddScore(1000*BonusMultiplier(CurrentPlayer))
     
      PlayMusic 4, "1000_Points"
      Bonus = Bonus - 1
      If Bonus - 10 > 0 Then Bb_Bonus(Bonus - 10).State = BulbOn
   ElseIf Bonus <= 10 And Bonus > 0 Then
      Bb_Bonus(Bonus).State = BulbOff
      AddScore(1000*BonusMultiplier(CurrentPlayer))
     
      PlayMusic 4, "1000_Points"
      Bonus = Bonus - 1
      If Bonus > 0 Then Bb_Bonus(Bonus).State = BulbOn
   End If

   If BonusMultiplier(CurrentPlayer) > 1 And Bonus = 0 Then
      BonusMultiplier(CurrentPlayer) = BonusMultiplier(CurrentPlayer) - 1
      Bonus = BonusTemp

      If Bonus > 20 Then
         Bb_Bonus(Bonus - 20).State = BulbOn
         Bb_Bonus20.State = BulbOn
      ElseIf Bonus = 20 Then
         Bb_Bonus20.State = BulbOn
      ElseIf Bonus > 10 Then
         Bb_Bonus(Bonus - 10).State = BulbOn
         Bb_Bonus(10).State = BulbOn
      ElseIf Bonus <= 10 Then
         Bb_Bonus(Bonus).State = BulbOn
      End If

      SaucerBonusTimer.Enabled = False
      SaucerBonusBreakTimer.Enabled = True
     
   End If
End Sub

Sub SaucerBonusBreakTimer_Expired()
   SaucerBonusBreakTimer.Enabled = False
   'SaucerBonusTimer.Enabled = True
   Kicker1.SolenoidPulse
   TurnOffLights()
   Bb_Bonus(1).State = BulbOn
   Bonus = 1
   BonusMultiplier(CurrentPlayer) = 1

   CloseBottomGate()

   Bb_2x.State = BulbOff
   Bb_3x.State = BulbOff
   Bb_5x.State = BulbOff
   
   DT_Reset()
   PlaySound "Saucer"

End Sub


Last edited by Gimli on Fri Apr 20, 2018 1:10 am, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Script Help Needed
 Post Posted: Thu Apr 19, 2018 11:50 am 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2081
Location: Ontario, Canada
I just added

Code:
AddScore(1000*BonusMultiplier(CurrentPlayer))


to the code above.
I think you need that to take the BonusMultiplier into account?


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

Board index » Future Pinball » FAQ & Help


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: