A demo of Zyborg's Donkey Kong Country-themed Pinball. K-O-N-G lanes slightly glitchy, need help with code.
A demo of Zyborg's Donkey Kong Country-themed Pinball. Includes Banana Bumpers, Banana Rollovers, and Banana spinners; Kremling drop targets; K-O-N-G lanes; and Blast Barrel Kickers. Missing some sound effects, no playfield image, and the K-O-N-G lane bonus doesn't work.
Hi Zyborg,
I have taken the liberty of trying to teach you some collections here - I think it will help you a lot (& reduce the size of your scripting by a massive margin).
I have added to your script how to use collections for the target_hit/light routines that you use (including comments to try & explain what I've done)
I've also changed your AddScore routine to incorporate your "flicker_trigger" double scoring...again removing huge amounts of repeated code throughout the script.
The "problem" with your "K-O-N-G lane bonus" is how you are using the timer - when a timer is added to a table it is set with a default "timer interval" of 100 - i.e. it will run for 100ms (0.1s). Also, by default a timer is set to "enabled"
- you have yours set to become dis-enabled after one cycle. So your routine works fine...just for 0.1s (& it does so for the first 0.1s of the table being run)
=> you can set the timer interval to be longer in 2 ways - click on the timer on the playfield & set the value in the options box, or set it in the script using the command "FlickerTimer.TimerInterval=" (& then a number in milli-seconds)
=> you can set the timer to be off (.enabled=false) at table start in 2 ways - click on the timer on the playfield & set the value in the options box, or set it in the script...preferably in the table1_init sub-routine.
(You may not be aware of this...but every playfield object has its own built in timer...so instead of addding a timer, you could use the KLight.TimerEnabled & then have a sub for KLiight_Timer, etc....doesn't save much, just saves on having loads of extra playfield objects to keep track of).
Have a look at the attached script (& the "collection manager" in the editor) - see if this makes sense. Any questions, please don't hesitate to ask...no matter how dumb you may think it is...I may have gone too quickly for you here, but your scripting shows good promise so far for a beginner, so you may be able to handle it

Hope this helps.
Regards,
Dan.
Dude, thanks, Wizards_hat! I will definitely credit you on my next release. Collections seem simple enough, should speed things up for me.