Friday Discount - Lifetime Access for $20!!!! - Click Here!

Plunger Settings in the Pinball Games iOS and tvOS Starter Kit

Plunger Settings in the Pinball Games iOS and tvOS Starter Kit

 

Plungers have relatively few settings, as you can see below…

Plunger settings

Like Flippers, the sprite you use as a plunger, needs to have a name that matches exactly to a dictionary in the Plungers dictionary, and a Custom Class set to Plunger. Since we only have one plunger in the scene, we’ve given it the simple, and appropriate name of Plunger.

Watch a detailed video on how to setup your Plunger(s)

Your plunger dictionary can include the following properties…

  • AddsToGoal – this can be a String value or Array of Strings to add toward an unlimited number of Goals. So every time the plunger is used, the goal(s) listed are incremented by 1. Most likely, your plunger Goals don’t reward the player, but instead simply light up or animate things on the table, then reset themselves to be triggered again.
  • BaseImpulseAmount – the impulse amount the plunger will start with. This amount is used to force the ball upward out of the plunger alley. This is the minimum amount the plunger will begin with.
  • ImpulseFactor – the amount to incrementally add to the plunger while it is being pulled down. A number like 125 works well in our demo, but you may need to raise or lower this number depending on the mass of the plunger (how big the plunger’s art / physics body is). If you notice the ball ever drops down through the plunger, raise or lower this number. Most likely the plunger is moving too fast and the ball is moving upward slower than the plunger is accelerating.
  • MaxToGoDown – The max number of points the plunger will descent downward. So if this number is 200, the lowest the plunger can go is 200 points down from it’s starting position. This too could be a number to tinker with if you ever notice the ball escaping the plunger.

You can disable manually pulling down the plunger, and have it automatically go to it’s lowest point then launch, by going to your TableSettings dictionary and setting SimplePlungerLaunch to YES. This is a good setting if your pinball app is intended for younger audiences that might not think to pull down on the screen to launch the ball, or on the Apple TV, hold down the touch pad on the remote (on an external game controller, holding down the A button launches the ball).

 




Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!