The game plays fine and accepts credits by making the change sound but they do not show in the credit box. The credits on the backglass show 0 when the game is first loaded then after a few seconds the credits go blank. I changed the backscreen with another one that was working fine and it has the same problem. There must be something wrong in the script. Thanks for any help or suggestions. The script is below with no line numbers.
' CREDITS
' Initial table created by fuzzel, jimmyfingers, jpsalas, toxie & unclewilly (in alphabetical order)
' Flipper primitives by zany
' Ball rolling sound script by jpsalas
' Ball shadow by ninuzzu
' Ball control by rothbauerw
' DOF by arngrim
' Positional sound helper functions by djrobx
' Plus a lot of input from the whole community (sorry if we forgot you :/)
'*****************************************************************************************************
On Error Resume Next
ExecuteGlobal GetTextFile("controller.vbs")
If Err Then MsgBox "You need the Controller.vbs file"
On Error Goto 0
Const cGameName = "Bally_Hoo"
Const BallSize = 25 'Ball radius
B2SOn=True 'Set this to false if you don't use direct2BS
Dim Controller
Dim B2SScore
Dim B2SOn
dim score(5) 'Reel score
dim truesc(4) 'True reel score if overring the number of digits
dim reel(5) 'Maximum number of scoring reels
dim state
dim credit 'Credits
dim eg 'End Game
dim currpl 'Current player status
dim playno 'Number of players
dim up(4) 'Player up
dim play(4) 'Player status
dim rst 'Reset Variable
dim bip 'Ball in play
dim match(10)
dim tilt
dim tiltsens
dim rep(4)
dim plm(4)
dim matchnumb
dim obj
dim update
dim cred
dim bell 'Global scoring sound variable
dim points
dim tempscore
dim replay1
dim replay2
dim replay3
dim replay4
dim hisc 'High Score to date
dim ba 'Bonus Advance index
dim batemp 'Bonus advance temporary variable
dim wv 'Wheel Value (positiion)
dim qs 'Quickstep (automatic difficulty level)
dim i 'Indexing variable
dim scn 'Single points score timer
dim scn1 'Single points end score timer
dim scn2 'Multiple points score timer
dim scn3 'Multiple points end score timer
dim scn4 'Multiple points end score timer
dim scn5 'Multiple points end score timer
If Table1.ShowDT=false then
reel1.Visible=false
reel2.Visible=false
reel3.Visible=false
reel4.Visible=false
reel5.Visible=false
playno1.Visible=false
playno2.Visible=false
playno3.Visible=false
playno4.Visible=false
up1.Visible=false
up2.Visible=false
up3.Visible=false
up4.Visible=false
bip1.Visible=false
bip2.Visible=false
bip3.Visible=false
bip4.Visible=false
bip5.Visible=false
m0.Visible=false
m1.Visible=false
m2.Visible=false
m3.Visible=false
m4.Visible=false
m5.Visible=false
m6.Visible=false
m7.Visible=false
m8.Visible=false
m9.Visible=false
credittxt.Visible=false
gamov.Visible=false
End If
Sub Table1_Init
scntimer.enabled=false
set play(1)=up1
set play(2)=up2
set play(3)=up3
set play(4)=up4
set match(0)=m0
set match(1)=m1
set match(2)=m2
set match(3)=m3
set match(4)=m4
set match(5)=m5
set match(6)=m6
set match(7)=m7
set match(8)=m8
set match(9)=m9
set reel(1)=reel1
set reel(2)=reel2
set reel(3)=reel3
set reel(4)=reel4
set reel(5)=reel5
replay1=4300
replay2=5400
replay3=6500
replay4=7600
loadhs
if hisc="" then hisc=1000
if credit="" then credit=0
reel5.setvalue(hisc)
credittxt.text=credit
select case(matchnumb)
case 0:
m0.text="0"
case 1:
m1.text="1"
case 2:
m2.text="2"
case 3:
m3.text="3"
case 4:
m4.text="4"
case 5:
m5.text="5"
case 6:
m6.text="6"
case 7:
m7.text="7"
case 8:
m8.text="8"
case 9:
m9.text="9"
end select
for i=1 to 4
currpl=i
reel(i).setvalue(score(i))
next
currpl=0
B2SOn=True
if B2SOn then
Set Controller = CreateObject("B2S.Server")
Controller.B2SName = "Bally_Hoo"
Controller.Run()
If Err Then MsgBox "Can't Load B2S.Server."
end if
If B2SOn Then
if matchnumb=0 then
Controller.B2SSetMatch 10
else
Controller.B2SSetMatch matchnumb
end if
If B2SOn Then
Controller.B2SSetShootAgain 0
Controller.B2SSetTilt 0
Controller.B2SSetCredits Credit
Controller.B2SSetGameOver 1
Controller.B2SSetData 81,0
Controller.B2SSetData 82,0
Controller.B2SSetData 83,0
Controller.B2SSetData 84,0
Controller.B2SSetScorePlayer1 0
Controller.B2SSetScorePlayer2 0
Controller.B2SSetScorePlayer3 0
Controller.B2SSetScorePlayer4 0
Controller.B2SSetScorePlayer5 hisc
End If
End If
for i=1 to 4
If B2SOn Then
Controller.B2SSetScorePlayer(i), 0
End If
next
centerpost.visible=true
centerpost1.visible=false
stopper.isdropped=true
postlight1.state=0
End Sub
If keycode = PlungerKey Then
Plunger.PullBack
End If
playsound "coin3"
coindelay.enabled=true
end if
playsound "coin3"
coindelay1.enabled=true
end if
credit=credit-1
qs=qs-1
if qs<0 then qs=0
credittxt.text=credit
eg=0
playno=1
playno1.state=1
currpl=1
play(currpl).state=1
playsound "click"
playsound "initialize"
rst=0
bip=1
resettimer.enabled=true
If B2SOn Then
Controller.B2SSetTilt 0
Controller.B2SSetGameOver 0
Controller.B2SSetMatch 0
Controller.B2SSetCredits Credit
Controller.B2SSetCanPlay 1
Controller.B2SSetPlayerUp 1
Controller.B2SSetShootAgain 0
Controller.B2SSetData 81,0
Controller.B2SSetData 82,0
Controller.B2SSetData 83,0
Controller.B2SSetData 84,0
Controller.B2SSetBallInPlay bip
Controller.B2SSetScoreRolloverPlayer1 0
Controller.B2SSetScorePlayer1 0
Controller.B2SSetScorePlayer2 0
Controller.B2SSetScorePlayer3 0
Controller.B2SSetScorePlayer4 0
Controller.B2SSetScorePlayer5 hisc
End If
end if
if keycode = 2 and credit>0 and state=true and playno>0 and playno<4 and bip<2 then
credit=credit-1
credittxt.text=credit
playno=playno+1
if playno=2 then playno2.state=1: playno1.state=0
if playno=3 then playno3.state=1: playno2.state=0
if playno=4 then playno4.state=1: playno3.state=0
playsound "click"
If B2SOn Then
Controller.B2SSetCredits Credit
Controller.B2SSetCanPlay playno
end if
end if
Nudge 90, 2
checktilt
End If
If keycode = RightTiltKey Then
Nudge 270, 2
checktilt
End If
If keycode = CenterTiltKey Then
Nudge 0, 2
checktilt
End if
End If
If keycode = PlungerKey Then Plunger.PullBack: PlaySound "plungerpull",0,1,0.25,0.25: End If
If keycode = LeftFlipperKey Then LeftFlipper.RotateToEnd: PlaySound "flipperup"
If keycode = RightFlipperKey Then RightFlipper.RotateToEnd: PlaySound "flipperup"
End If
End Sub
If keycode = PlungerKey Then Plunger.Fire: PlaySound "plunger",0,1,0.25,0.25
If keycode = LeftFlipperKey Then LeftFlipper.RotateToStart: PlaySound "flipperdown"
If keycode = RightFlipperKey Then RightFlipper.RotateToStart: PlaySound "flipperdown"
End Sub
Sub newgame
LightReset
ton1.text=" "
ton2.text=" "
ton3.text=" "
ton4.text=" "
credtimer.enabled=false
scntimer.enabled=false
state=true
eg=0
for i=0 to 3
score(i)=0
truesc(i)=0
rep(i)=0
next
bip5.text=" "
bip1.text="1"
for i=0 to 9
match(i).text=" "
next
tilttext.text=" "
gamov.text=" "
tilt=false
tiltsens=0
bip=1
centerpost.visible=true
centerpost1.visible=false
stopper.isdropped=true
postlight1.state=0
Bumper1.force=11
Bumper2.force=11
Bumper3.force=11
wheelcheck
nb.CreateBall
nb.kick 90,6
tilt=false
end sub
rst=rst+1
reel1.resettozero
reel2.resettozero
reel3.resettozero
reel4.resettozero
If B2SOn Then
Controller.B2SSetScorePlayer1 0
Controller.B2SSetScorePlayer2 0
Controller.B2SSetScorePlayer3 0
Controller.B2SSetScorePlayer4 0
Controller.B2SSetScorePlayer5 hisc
End If
if rst=14 then
playsound "kickerkick"
end if
if rst=18 then
newgame
resettimer.enabled=false
end if
end sub
playsound "click"
credit=credit+5
credittxt.text=credit
coindelay.enabled=false
If B2SOn Then
Controller.B2SSetCredits Credit
End If
end sub
playsound "click"
credit=credit+1
credittxt.text=credit
coindelay1.enabled=false
If B2SOn Then
Controller.B2SSetCredits Credit
End If
end sub
b1.State=0
b2.State=0
b3.State=0
b4.State=0
b5.State=0
b6.State=0
b7.State=0
b8.State=0
b9.State=0
b10.State=0
Light14.state=0
If B2SOn Then Controller.B2SSetShootAgain 0
BumperLight1.State=0
BumperLight2.State=0
BumperLight3.State=0
ba=0
End Sub
'*** Points Scoring***
'*********************
if points=1 or points=10 then matchnumb=matchnumb+1
if matchnumb>=10 then matchnumb=0
reel(currpl).addvalue(1)
bell=1
scn=1
wheelcheck
end if
reel(currpl).addvalue(10)
bell=10
scn=1
end if
if points = 100 then
reel(currpl).addvalue(100)
bell=100
scn=1
end if
if points = 200 then
reel(currpl).addvalue(200)
playsound "motorshort1s"
bell=100
scn=2
end if
reel(currpl).addvalue(300)
playsound "motorshort1s"
bell=100
scn=3
end if
reel(currpl).addvalue(400)
playsound "motorshort1s"
bell=100
scn=4
end if
reel(currpl).addvalue(50)
playsound "motorshort1s"
bell=10
scn=5
end if
if points = 500 then
reel(currpl).addvalue(500)
playsound "motorshort1s"
bell=100
scn=5
end if
scn1=0
scntimer.enabled=true
truesc(currpl)=truesc(currpl)+points
If B2SOn Then
Controller.B2SSetScore currpl,score(currpl)
end if
if score(currpl)>9999 then
score(currpl)=score(currpl)-10000
rep(currpl)=0
end if
credit=credit+1
qs=qs+2
playsound "knocker"
credittxt.text=credit
If B2SOn Then
Controller.B2SSetCredits Credit
end if
rep(currpl)=1
playsound "click"
end if
credit=credit+1
playsound "knocker"
credittxt.text=credit
If B2SOn Then
Controller.B2SSetCredits Credit
end if
qs=qs+2
rep(currpl)=2
playsound "click"
end if
credit=credit+1
qs=qs+2
playsound "knocker"
credittxt.text=credit
If B2SOn Then
Controller.B2SSetCredits Credit
end if
rep(currpl)=3
playsound "click"
end if
credit=credit+1
qs=qs+2
playsound "knocker"
credittxt.text=credit
If B2SOn Then
Controller.B2SSetCredits Credit
end if
rep(currpl)=4
playsound "click"
end if
if score(1)>=10000 then ton1.text="10,000"
if score(2)>=10000 then ton2.text="10,000"
if score(3)>=10000 then ton3.text="10,000"
if score(4)>=10000 then ton4.text="10,000"
end if
end sub
sub scntimer_timer
scn1=scn1 + 1
if bell=1 then playsound "bell1",0, 0.15, 0, 0
if bell=10 then playsound "bell10",0, 0.3, 0, 0
if bell=100 then playsound "bell100",0, 0.45, 0, 0
if scn1>=scn then scntimer.enabled=false
end sub
sub wheelcheck
If wv>9 or wv<0 then wv=0
Light2.state=0
Light3.state=0
Light4.state=0
Light5.state=0
b11.state=0
Light12.state=1
Light13.state=0
quickstep
End If
Light2.state=1
Light3.state=0
Light4.state=0
Light5.state=0
b11.state=1
Light12.state=0
Light13.state=0
quickstep
End If
If wv=2 or wv=7 then
Light2.state=0
Light3.state=1
Light4.state=0
Light5.state=0
b11.state=0
Light12.state=1
Light13.state=0
quickstep
End If
Light2.state=0
Light3.state=0
Light4.state=1
Light5.state=0
b11.state=0
Light12.state=1
Light13.state=0
quickstep
End If
Light2.state=0
Light3.state=0
Light4.state=0
Light5.state=1
b11.state=1
Light12.state=0
Light13.state=1
quickstep
End If
end sub
Sub quickstep
If wv=1 and qs>=8 then
b11.state=0
Light12.state=0
Light13.state=0
End If
b11.state=0
Light12.state=0
Light13.state=0
End If
b11.state=0
Light12.state=0
Light13.state=0
End If
b11.state=0
Light12.state=0
Light13.state=0
End If
b11.state=0
Light12.state=0
Light13.state=1
End If
sub bonusadvance
if tilt=false then
ba=ba+1
if ba>10 then ba=10 'Set the maximim bonus limit
batemp=ba
if batemp>9 then
b10.state=1
batemp=batemp-10
end if
select case (batemp)
case 1:
b1.state=1
case 2:
b2.state=1
case 3:
b3.state=1
case 4:
b4.state=1
case 5:
b5.state=1
case 6:
b6.state=1
case 7:
b7.state=1
case 8:
b8.state=1
case 9:
b9.state=1
case 10:
b10.state=1
end select
end if
end sub
playsound "motorshorter"
batemp=ba
if batemp<11 then b10.state=0
select case (batemp)
case 1:
b1.state=0
case 2:
b2.state=0
case 3:
b3.state=0
case 4:
b4.state=0
case 5:
b5.state=0
case 6:
b6.state=0
case 7:
b7.state=0
case 8:
b8.state=0
case 9:
b9.state=0
case 10:
b10.state=0
end select
if (b11.state)=0 then addscore 10
if (b11.state)=1 then addscore 100
ba=ba-1
if ba<=0 then
bonuscount.enabled=false
b1.state=0
Kicktimer.enabled=True
end if
end sub
Sub CheckTilt
If Tilttimer.Enabled = True Then
TiltSens = TiltSens + 1
if TiltSens = 2 Then
Tilt = True
tilttext.text="TILT"
If B2SOn then Controller.B2SSetTilt 1
tiltsens = 0
playsound "tilt"
centerpost.visible=true
centerpost1.visible=false
stopper.isdropped=true
postlight1.state=0
Bumper1.force=0
Bumper2.force=0
Bumper3.force=0
turnoff
End If
Else
TiltSens = 0
Tilttimer.Enabled = True
End If
End Sub
Tilttimer.Enabled = False
End Sub
tiltseq.play seqalloff
end sub
Sub Drain_Hit()
playsound "drainshorter"
Drain.DestroyBall
nextball
End Sub
centerpost.visible=true
centerpost1.visible=false
stopper.isdropped=true
postlight1.state=0
Bumper1.force=11
Bumper2.force=11
Bumper3.force=11
if tilt=true then
tilt=false
tilttext.text=" "
tiltseq.stopplay
If B2SOn then Controller.B2SSetTilt 0
end if
If Light14.State=1 then
playsound "kickerkick"
ballreltimer.enabled=true
nb.kick 90,6
LightReset
else LightReset
currpl=currpl+1
end if
if currpl>playno then
bip=bip+1
if bip>5 then
playsound "motorleer"
eg=1
ballreltimer.enabled=true
else
if state=true and tilt=false then
play(currpl-1).state=0
currpl=1
play(currpl).state=1
playsound "kickerkick"
ballreltimer.enabled=true
end if
If B2SOn then Controller.B2SSetBallInPlay bip
If B2SOn then Controller.B2SSetPlayerUp currpl
select case (bip)
case 1:
bip1.text="1"
case 2:
bip1.text=" "
bip2.text="2"
case 3:
bip2.text=" "
bip3.text="3"
case 4:
bip3.text=" "
bip4.text="4"
case 5:
bip4.text=" "
bip5.text="5"
end select
end if
end if
if currpl>1 and currpl<(playno+1) then
if state=true and tilt=false then
play(currpl-1).state=0
play(currpl).state=1
If B2SOn Then
Controller.B2SSetData 81,0
Controller.B2SSetData 82,0
Controller.B2SSetData 83,0
Controller.B2SSetData 84,0
Controller.B2SSetData (80+currpl),1
Controller.B2SSetPlayerUp currpl
Controller.B2SSetBallInPlay bip
playsound "kickerkick"
ballreltimer.enabled=true
end if
end if
end Sub
if eg=1 then
matchnum
bip3.text=" "
bip5.text=" "
state=false
for i=1 to 4
if truesc(i)>hisc then
hisc=truesc(i)
reel(i)=hisc
end if
next
play(currpl-1).state=0
playno=0
gamov.text="GAME OVER"
If B2SOn Then
Controller.B2SSetGameOver 1
Controller.B2SSetBallInPlay 0
Controller.B2SSetPlayerUp 0
Controller.B2SSetScorePlayer5 hisc
end if
savehs
reel5.setvalue(hisc)
credtimer.enabled=true
ballreltimer.enabled=false
else
nb.CreateBall
nb.kick 90,6
ballreltimer.enabled=false
end if
end sub
sub matchnum
select case(matchnumb)
case 0:
m0.text="0"
case 1:
m1.text="1"
case 2:
m2.text="2"
case 3:
m3.text="3"
case 4:
m4.text="4"
case 5:
m5.text="5"
case 6:
m6.text="6"
case 7:
m7.text="7"
case 8:
m8.text="8"
case 9:
m9.text="9"
end select
If B2SOn Then
if matchnumb=0 then
Controller.B2SSetMatch 10
else
Controller.B2SSetMatch matchnumb
end if
End If
for i=0 to playno
if matchnumb=(score(i) mod 10) then
credit=credit+1
playsound "knocker"
credittxt.text= credit
playsound "click"
end if
next
end sub
'**********Sling Shot Animations
' Rstep and Lstep are the variables that increment the animation
'****************
Dim RStep, Lstep
bonusadvance
addscore 10
PlaySound "right_slingshot", 0, 1, 0.05, 0.05
RSling.Visible = 0
RSling1.Visible = 1
sling1.TransZ = -20
RStep = 0
RightSlingShot.TimerEnabled = 1
End Sub
Select Case RStep
Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0
End Select
RStep = RStep + 1
End Sub
bonusadvance
addscore 10
PlaySound "left_slingshot",0,1,-0.05,0.05
LSling.Visible = 0
LSling1.Visible = 1
sling2.TransZ = -20
LStep = 0
LeftSlingShot.TimerEnabled = 1
End Sub
Select Case LStep
Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0
End Select
LStep = LStep + 1
End Sub
' *********************************************************************
' Supporting Ball & Sound Functions
' *********************************************************************
Vol = Csng(BallVel(ball) ^2 / 2000)
End Function
Dim tmp
tmp = ball.x * 2 / table1.width-1
If tmp > 0 Then
Pan = Csng(tmp ^10)
Else
Pan = Csng(-((- tmp) ^10) )
End If
End Function
Pitch = BallVel(ball) * 20
End Function
BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
End Function
' JP's VP10 Rolling Sounds
'*****************************************
ReDim rolling(tnob)
InitRolling
Dim i
For i = 0 to tnob
rolling(i) = False
Next
End Sub
Dim BOT, b
BOT = GetBalls
For b = UBound(BOT) + 1 to tnob
rolling(b) = False
StopSound("fx_ballrolling" & b)
Next
If UBound(BOT) = -1 Then Exit Sub
For b = 0 to UBound(BOT)
If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
rolling(b) = True
PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b)), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
Else
If rolling(b) = True Then
StopSound("fx_ballrolling" & b)
rolling(b) = False
End If
End If
Next
End Sub
' Ball Collision Sound
'**********************
PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
End Sub
' What you need to add to your table
'************************************
' one collision sound, in this script is called fx_collide
' as many sound files as max number of balls, with names ending with 0, 1, 2, 3, etc
' for ex. as used in this script: fx_ballrolling0, fx_ballrolling1, fx_ballrolling2, fx_ballrolling3, etc
'******************************************
' Explanation of the rolling sound routine
'******************************************
' if the ball is on the table (height lower than 30) then then it plays the sound
' otherwise the sound is stopped, like when the ball has stopped or is on a ramp or flying.
' will change according to the ball speed, and the PAN function will change the stereo position according
' to the position of the ball on the table.
'**************************************
' Explanation of the collision routine
'**************************************
' You only need to add a Sub OnBallBallCollision(ball1, ball2, velocity) and when two balls collide they
' will call this routine. What you add in the sub is up to you. As an example is a simple Playsound with volume and paning
' depending of the speed of the collision.
PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub
PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub
PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
PlaySound "fx_spinner",0,.25,0,0.25
End Sub
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 20 then
PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 20 then
RandomSoundRubber()
End If
End Sub
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 20 then
PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 20 then
RandomSoundRubber()
End If
End sub
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 16 then
PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 16 then
RandomSoundRubber()
End If
End Sub
Select Case Int(Rnd*3)+1
Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Select
End Sub
RandomSoundFlipper()
End Sub
RandomSoundFlipper()
End Sub
Select Case Int(Rnd*3)+1
Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Select
End Sub
sub savehs
' Based on Black's Highscore routines
Dim FileObj
Dim ScoreFile
Set FileObj=CreateObject("Scripting.FileSystemObject")
If Not FileObj.FolderExists(UserDirectory) then
Exit Sub
End if
Set ScoreFile=FileObj.CreateTextFile(UserDirectory & "Bally_Hoo.txt",True)
scorefile.writeline credit
ScoreFile.WriteLine score(0)
ScoreFile.WriteLine score(1)
ScoreFile.WriteLine score(2)
ScoreFile.WriteLine score(3)
scorefile.writeline hisc
scorefile.writeline matchnumb
scorefile.writeline wv
scorefile.writeline qs
ScoreFile.Close
Set ScoreFile=Nothing
Set FileObj=Nothing
end sub
' Based on Black's Highscore routines
Dim FileObj
Dim ScoreFile
dim TextStr
dim temp1
dim temp2
dim temp3
dim temp4
dim temp5
dim temp6
dim temp7
dim temp8
dim temp9
Set FileObj=CreateObject("Scripting.FileSystemObject")
If Not FileObj.FolderExists(UserDirectory) then
Exit Sub
End if
If Not FileObj.FileExists(UserDirectory & "Bally_Hoo.txt") then
Exit Sub
End if
Set ScoreFile=FileObj.GetFile(UserDirectory & "Bally_Hoo.txt")
Set TextStr=ScoreFile.OpenAsTextStream(1,0)
If (TextStr.AtEndOfStream=True) then
Exit Sub
End if
temp1=TextStr.ReadLine
temp2=textstr.readline
temp3=textstr.readline
temp4=Textstr.ReadLine
temp5=Textstr.ReadLine
temp6=Textstr.ReadLine
temp7=Textstr.ReadLine
temp8=Textstr.ReadLine
temp9=Textstr.ReadLine
TextStr.Close
credit = CDbl(temp1)
score(0) = CDbl(temp2)
score(1) = CDbl(temp3)
score(2) = CDbl(temp4)
score(3) = CDbl(temp5)
hisc = CDbl(temp6)
matchnumb = CDbl(temp7)
wv = CDbl(temp8)
qs = CDbl(temp9)
Set ScoreFile=Nothing
Set FileObj=Nothing
end sub
' Table specific scoring
If tilt=false then Addscore 1
End Sub
Addscore 1
End Sub
If tilt=false then
Addscore 10
BumperLight1.State=1
End If
End Sub
If tilt=false then Addscore 100
End Sub
If tilt=false then
Addscore 10
BumperLight2.State=1
BumperLight3.State=1
End If
End Sub
If tilt=false then
playsound "tilt"
centerpost.visible=true
centerpost1.visible=false
stopper.isdropped=true
postlight1.state=0
End If
End Sub
If tilt=false then
playsound "tilt"
centerpost.visible=true
centerpost1.visible=false
stopper.isdropped=true
postlight1.state=0
End If
End Sub
If tilt=false then
Addscore 10
centerpost.visible=false
centerpost1.visible=true
stopper.isdropped=false
postlight1.state=1
End If
End Sub
If tilt=false then Addscore 100
End Sub
If tilt=false then Addscore 100
End Sub
If tilt=false then Addscore 100
End Sub
If tilt=false then Addscore 100
End Sub
If tilt=false then Addscore 1
End Sub
If tilt=false then Addscore 1
End Sub
If tilt=false then Addscore 1
End Sub
If tilt=false then Addscore 1
End Sub
If tilt=false then
Bonusadvance
Addscore 10
End If
End Sub
If tilt=false then Addscore 1
End Sub
addscore 10
centerpost.visible=false
centerpost1.visible=true
stopper.isdropped=false
postlight1.state=1
End Sub
Sub Bumper1_Hit()
If Tilt=False then
PlaySound "jet1"
If BumperLight1.State=1 Then Addscore 10 Else addscore 1
End If
End Sub
If Tilt=False then
PlaySound "jet1"
If BumperLight2.State=1 Then Addscore 10 Else addscore 1
End If
End Sub
If Tilt=False then
PlaySound "jet1"
If BumperLight3.State=1 Then Addscore 10 Else addscore 1
End If
End Sub
Sub Kicker1_Hit()
if tilt=false then
If Light5.State=1 then Addscore 500
If Light4.State=1 then Addscore 400
If Light3.State=1 then Addscore 300
If Light2.State=1 then Addscore 200
If Light2.State=0 and Light3.State=0 and Light4.State=0 and Light5.State=0 then addscore 100
End If
KickTimer.enabled=True
End Sub
if tilt=false then
bonuscount.enabled=true
end if
End Sub
if tilt=false then
If Light13.State=1 then
Light14.State=1
Controller.B2SSetShootAgain 1
End If
Addscore 100
end if
KickTimer.enabled=True
End Sub
if tilt=false then
If Light12.State=1 then Kicker4.Kick 0,25 Else Kicker4.Kick 120,3
Light12.State=0
end if
End Sub
KickTimer.enabled=False
Kicker1.Kick (int(rnd(1)*10)+90),15
Kicker2.Kick (int(rnd(1)*5)+165),15
Kicker3.Kick 0,(int(rnd(1)*10)+30)
Playsound "Eject"
End Sub




Top












are all trademarks of VPFORUMS.