|
Code samples will be updated weekly.
Boris Script by Boris
T2 Cannon by Zaphod
Custom games and VWPC Mame integration by Zaphod
Earthquake effect by CJPace
Lethal Weapon 3 bare table by Zaphod
Boris Script by Boris
Boris has created a script to handle basic playfield operation, extra ball, special, match
award, attrack mode, tilt system, number of balls, points system, hightest score, input
player's initials, save and load parameters and scores. Highly recommended. You can get
his script at Boris
Home Page .
T2 Cannon by Zaphod
Zaphod has presented his version of the T2 cannon on the VP Forum:
"Can too do the skull. :)
One drop target.
One kicker behind it.
One kicker by the wireframe that leads to the cannon.
One kicker where the cannon is.
And one Flipper RIGHT below it, with a REALLY slow. rotation speed.
The kicker behind the drop target, destroys theball, and theone at the start of the
wireform creates aball, which rolls along the wireform to the third kicker...
Now, the flipper moves down,and a timer starts to return it a few seconds later.
See attached file. :) All five targets CAN be hit"
Download T2 Cannon (56KB)
Custom Games and VWPC Mame integration by Zaphod
There are two types of code. One is good for wpcmame integration, and
other types are good for custom games.
Here's a few examples.
Kickerless Kickback. This is useful both on normal tables and wpcmame
tables.
Just put a plunger (called Kickback) embedded in the wall below the
outlane. It should be invisible wen pulled back, but not when put
forward. PLace a trigger at the bottom of the outlane. Also, set the
release speed on the plunger to something at least 100, if not higher,
and the pullback speed to be around 9000
Now you need to have the following subroutines.
Sub Kickback_Init ()
Kickback.PullBack
End Sub
This one pulls it back at the start.
Sub TriggerKickback_Hit ()
If KickbackEnabled Then
KickBack.Fire
End Sub
Sub TriggerKickBack_Unhit ()
Kickback.PullBack
End Sub
When a ball hits the trigger, the plunger fires, knocking the ball back
off the trigger, and causing it to retract again. Tweak the release
speed to adjust the kickback strength. If it reaches the top before it
hits the ball, you have it too low, and need to raise your plunger a
bit.
Ball Scoop.
Many games have areas where a ball goes into a hole, waits for a bit,
then kicks out the same (or a different) hole. For a single ball game,
you just make the kicker destroyball, then call a timer. But what if you
are in mutiball? If you send two balls in at once, one will vanish!
What can you do? Dim a variable called something like "BallsInLimbo" and
set it to zero in Table_Init.
Whenever you make that kicker destroy a ball, make it increment that
variable. And make the timer routine decrease it when it creates a
ball, then check to see if it's greater than zero or not. If it is
greater than zero, then it should refuse to disable itself, so after
another timer interval, it will kick out another ball, then checkto see
if there are more still inside. Ten ballscango into the kicker before
the firstone comes out, ten more can goin after the first one comes out,
and eventualy all 21 balls will be back on the table. It NEVER eats a
ball if you've coded it like I did.
You need a Limbo variable for each kickout, but not each entrance. The
Addams family, for instance, requires two. One for the electric chair,
and one for the swamp. Funhouse only requires one, because all four
entrances (steps manhole, wind tunnel, trapdoor, and the exit) all kick
out of the same spot.
Note. You will find this same limbo technique a good way to work around
that annoying bug where a ball can enter a kicker that already has a
ball on it. If you want locked balls to be visible on the playfield,
and inthe same place, a common approach is to use one kicker for each
ball. However if it's possible for balls to go into the ball lock
areain multiball, like in Back to the Future or Black Knight 2000, then
you will have troubles. Adding an extra kicker that uses Limbo code in
front of the locks will serve to seperate multiple balls.
Earthquake Effect by CJPace
Whilst playing around I came up with an idea for an
earthquake effect. To get it to work you need a trigger, a light and a timer object. Make
sure the Enabled property is not checked. Hopefully this will be usefull to you or anyone
else.
Dim TimerStart
Sub Trigger1_Hit()
TimerStart = Timer
Timer1.Enabled = True
End Sub
Sub Timer1_Timer()
Light1.State = LightStateBlinking
Nudge Int(360 * Rnd),Int((10 * Rnd) + 1)
If Timer > TimerStart + 1.5 Then
Timer1.Enabled = False
Light1.State = LightStateOff
End If
End Sub
Lethal Weapon 3 bare table by Zaphod
Here is acomplete layoutand switch set for Lethal
Weapon pinball game.
The big ramp is there,all the bumpers, all the ejects and VUKs, all the targets.. All
that's missing is the rules.
ALos here are a few cool tricks.
1) a GOOD TILT function. It models a pendulum tilt. If you shake too much, the game will
abourt with a script error, showing you wher to put your tilt routine.
2) Invisible kickers. I created a wall with top at-1. :) CAlled it "Invisible"
:)
3)Use of kickers to effectively simulate end of ramp stoppers.
4) a kickback that's not a kicker.
5) an autoplunger that's not a kicker.
My code is commented a bit.
Download Lethal Weapon bare table
|