GoPinball.com http://www.gopinball.com/forum/ | |
Script Help Needed http://www.gopinball.com/forum/viewtopic.php?f=84&t=6643 |
Page 1 of 1 |
Author: | SlipperyJimdiGris [ Tue Apr 17, 2018 7:47 pm ] |
Post subject: | Script Help Needed |
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 |
Author: | Gimli [ Wed Apr 18, 2018 8:21 am ] |
Post subject: | Re: Script Help Needed |
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 |
Author: | Gimli [ Wed Apr 18, 2018 9:14 am ] |
Post subject: | Re: Script Help Needed |
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 |
Author: | SlipperyJimdiGris [ Wed Apr 18, 2018 5:38 pm ] |
Post subject: | Re: Script Help Needed |
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 |
Author: | Gimli [ Wed Apr 18, 2018 6:35 pm ] |
Post subject: | Re: Script Help Needed |
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... |
Author: | SlipperyJimdiGris [ Wed Apr 18, 2018 7:44 pm ] |
Post subject: | Re: Script Help Needed |
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 |
Author: | Gimli [ Thu Apr 19, 2018 8:59 am ] |
Post subject: | Re: Script Help Needed |
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 |
Author: | Gimli [ Thu Apr 19, 2018 11:50 am ] |
Post subject: | Re: Script Help Needed |
I just added Code: AddScore(1000*BonusMultiplier(CurrentPlayer)) to the code above. I think you need that to take the BonusMultiplier into account? |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |