Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
Option Explicit On Error Resume Next ExecuteGlobal GetTextFile("controller.vbs") If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package" On Error Goto 0 ' Options ' Volume devided by - lower gets higher sound Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound Const VolCol = 10 ' Ball collition divider ( voldiv/volcol ) Dim VarRol, VarHidden VarHidden=0 If Table1.ShowDT = true then VarRol=0 Else VarRol=1 If B2SOn = true Then VarHidden=1 Const cGameName="icefever",UseSolenoids=2,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff",SFlipperOn="FlipperUp",SFlipperOff="FlipperDown" Const SCoin="coin3",cCredits="" LoadVPM "01120100","sys80.vbs",3.02 '********************************************************** '******** OPTIONS ******************************* '********************************************************** Dim BallShadows: Ballshadows=1 '******************set to 1 to turn on Ball shadows Dim FlipperShadows: FlipperShadows=1 '***********set to 1 to turn on Flipper shadows Dim ROMSounds: ROMSounds=1 '**********set to 0 for no rom sounds, 1 to play rom sounds.. mostly used for testing Sub Table1_KeyDown(ByVal keycode) If vpmKeyDown(KeyCode) Then Exit Sub If keycode=PlungerKey Then Plunger.Pullback if keycode = 46 then ' C Key If contball = 1 Then contball = 0 Else contball = 1 End If End If if keycode = 48 then 'B Key If bcboost = 1 Then bcboost = bcboostmulti Else bcboost = 1 End If End If if keycode = 203 then bcleft = 1 ' Left Arrow if keycode = 200 then bcup = 1 ' Up Arrow if keycode = 208 then bcdown = 1 ' Down Arrow if keycode = 205 then bcright = 1 ' Right Arrow End Sub Sub Table1_KeyUp(ByVal keycode) If vpmKeyUp(KeyCode) Then Exit Sub If keycode=PlungerKey Then Plunger.Fire if ballhome.BallCntOver>0 then PlaySoundAt "plungerreleaseball", Plunger 'PLAY WHEN BALL IS HIT else PlaySoundAt "plungerreleasefree", Plunger 'PLAY WHEN NO BALL TO PLUNGE end if end If if keycode = 203 then bcleft = 0 ' Left Arrow if keycode = 200 then bcup = 0 ' Up Arrow if keycode = 208 then bcdown = 0 ' Down Arrow if keycode = 205 then bcright = 0 ' Right Arrow End Sub Sub StartControl_Hit() Set ControlBall = ActiveBall contballinplay = true End Sub Sub StopControl_Hit() contballinplay = false End Sub Dim bcup, bcdown, bcleft, bcright, contball, contballinplay, ControlBall, bcboost Dim bcvel, bcyveloffset, bcboostmulti bcboost = 1 'Do Not Change - default setting bcvel = 4 'Controls the speed of the ball movement bcyveloffset = -0.01 'Offsets the force of gravity to keep the ball from drifting vertically on the table, should be negative bcboostmulti = 3 'Boost multiplier to ball veloctiy (toggled with the B key) Sub BallControl_Timer() If Contball and ContBallInPlay then If bcright = 1 Then ControlBall.velx = bcvel*bcboost ElseIf bcleft = 1 Then ControlBall.velx = - bcvel*bcboost Else ControlBall.velx=0 End If If bcup = 1 Then ControlBall.vely = -bcvel*bcboost ElseIf bcdown = 1 Then ControlBall.vely = bcvel*bcboost Else ControlBall.vely= bcyveloffset End If End If End Sub Const sDrop=2 Const sPuck=5' backglass hockey puck Const sknocker=8 Const sOutHole=9 SolCallback(sDrop)="dtL.SolDropUp" SolCallback(sKnocker)="VpmSolSound SoundFX(""knocker"",DOFKnocker)," SolCallback(sOutHole)="bsTrough.SolOut" 'SolCallback(sLLFlipper)="VpmSolFlipper LeftFlipper,nothing," 'SolCallback(sLRFlipper)="VpmSolFlipper RightFlipper,nothing," SolCallback(sPuck)="AnimationStart" SolCallback(sLRFlipper) = "SolRFlipper" SolCallback(sLLFlipper) = "SolLFlipper" Sub SolLFlipper(Enabled) If Enabled Then PlaySound SoundFX("FlipperUp",DOFFlippers) LeftFlipper.RotateToEnd Else PlaySound SoundFX("FlipperDown",DOFFlippers) LeftFlipper.RotateToStart End If End Sub Sub SolRFlipper(Enabled) If Enabled Then PlaySound SoundFX("FlipperUp",DOFFlippers) RightFlipper.RotateToEnd Else PlaySound SoundFX("FlipperDown",DOFFlippers) RightFlipper.RotateToStart End If End Sub Sub FlipperTimer_Timer Dim PI: PI=3.1415926 LFlip.RotZ = LeftFlipper.CurrentAngle RFlip.RotZ = RightFlipper.CurrentAngle LflipRubber.RotZ = LeftFlipper.CurrentAngle RFlipRubber.RotZ = RightFlipper.CurrentAngle Pgate.Rotz = Gate1.CurrentAngle*0.7 PrimGate2.rotx = Gate2.currentangle*0.5 PrimGate3.rotx = Gate3.currentangle*0.5 Dim SpinnerRadius: SpinnerRadius=7 SpinnerRod.TransZ = (cos((spinner.CurrentAngle + 180) * (PI/180))+1) * SpinnerRadius SpinnerRod.TransY = (sin((spinner.CurrentAngle) * (PI/180))) * -SpinnerRadius if FlipperShadows=1 then FlipperLSh.RotZ = LeftFlipper.currentangle FlipperRSh.RotZ = RightFlipper.currentangle end if End Sub Kicker2.CreateBall.Image="HPuck" Sub AnimationStart(Enabled) Kicker2.Kick 180,5 End Sub Sub Kicker3_Hit:Me.DestroyBall:Kicker2.CreateBall.Image="HPuck":End Sub Dim bsTrough,dtL,bsCaptive Sub Table1_Init On Error Resume Next With Controller .GameName=cGameName If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub .SplashInfoLine="Ice Fever, Gottlieb 1985" & vbNewLine & "by Destruk, itchigo, Inkochnito, and lolo" & vbNewLine & "VPX conversion by Rascal" .HandleMechanics=0 .HandleKeyboard=0 .ShowDMDOnly=1 .ShowFrame=0 .ShowTitle=0 .Hidden = VarHidden .Games(cGameName).Settings.Value("rol")=VarRol If Err Then MsgBox Err.Description End With On Error Goto 0 Controller.SolMask(0)=0 vpmTimer.AddTimer 2000,"Controller.SolMask(0)=&Hffffffff'" 'ignore all solenoids - then add the timer to renable all the solenoids after 2 seconds Controller.Run ' Controller.Dip(0) = (0*1 + 0*2 + 0*4 + 0*8 + 0*16 + 0*32 + 0*64 + 1*128) '01-08 ' Controller.Dip(1) = (0*1 + 0*2 + 0*4 + 0*8 + 0*16 + 0*32 + 1*64 + 1*128) '09-16 ' Controller.Dip(2) = (0*1 + 0*2 + 0*4 + 0*8 + 0*16 + 1*32 + 1*64 + 1*128) '17-24 ' Controller.Dip(3) = (1*1 + 1*2 + 0*4 + 0*8 + 1*16 + 0*32 + 0*64 + 0*128) '25-32 'Switch 25 Number Of Balls ' ON = 3 ' OFF = 5 if ballshadows=1 then BallShadowUpdate.enabled=1 else BallShadowUpdate.enabled=0 end if if flippershadows=1 then FlipperLSh.visible=1 FlipperRSh.visible=1 else FlipperLSh.visible=0 FlipperRSh.visible=0 end if PinMAMETimer.Interval=PinMAMEInterval PinMAMETimer.Enabled=1 vpmNudge.TiltSwitch=57 vpmNudge.Sensitivity=5 vpmNudge.TiltObj=Array(LeftSlingshot,RightSlingshot,Bumper1,Bumper2,Bumper3,Bumper4) Set bsTrough=New cvpmBallstack bsTrough.InitSw 0,67,0,0,0,0,0,0 bsTrough.InitKick BallRelease,90,5 bsTrough.InitExitSnd SoundFX("ballrel",DOFContactors),SoundFX("solon",DOFContactors) bsTrough.Balls=1 Set dtL=New cvpmDropTarget dtL.InitDrop Array(Target5,Target6,Target7),Array(40,50,60) dtL.initsnd SoundFX("flapclos",DOFContactors),SoundFX("flapopen",DOFContactors) kicker1.createball kicker1.kick 0, 1 ' Set bsCaptive=New cvpmCaptiveBall ' bsCaptive.InitCaptive Trigger5,Wall10,Kicker1,351 ' bsCaptive.Start ' bsCaptive.MinForce=3.5 ' bsCaptive.ForceTrans=.8 ' bsCaptive.CreateEvents "bsCaptive" End Sub Sub Trigger1_Hit:Controller.Switch(41)=1:End Sub Sub Trigger1_unHit:Controller.switch(41)=0:End Sub Sub LeftInlane_Hit:Controller.Switch(43)=1:End Sub Sub LeftInlane_unHit:Controller.Switch(43)=0:End Sub Sub Bumper1_Hit:vpmTimer.PulseSw 44:PlaySoundAt SoundFX("JetBumper",DOFContactors), ActiveBall:DOF 103, DOFPulse:End Sub Sub Bumper2_Hit:vpmTimer.PulseSw 44:PlaySoundAt SoundFX("JetBumper2",DOFContactors), ActiveBall:DOF 105, DOFPulse:End Sub Sub Bumper3_Hit:vpmTimer.PulseSw 44:PlaySoundAt SoundFX("JetBumper3",DOFContactors), ActiveBall:DOF 106, DOFPulse:End Sub Sub Bumper4_Hit:vpmTimer.PulseSw 44:PlaySoundAt SoundFX("JetBumper4",DOFContactors), ActiveBall:DOF 104, DOFPulse:End Sub Sub Trigger2_Hit:Controller.Switch(51)=1:End Sub Sub Trigger2_unHit:Controller.switch(51)=0:End Sub Sub RightInlane_Hit:Controller.Switch(53)=1:End Sub Sub RightInlane_UnHit:Controller.Switch(53)=0:End Sub Sub Trigger3_Hit:Controller.Switch(61)=1:End Sub Sub Trigger3_unHit:Controller.switch(61)=0:End Sub Sub LeftOutlane_Hit:Controller.Switch(63)=1:DOF 107, DOFOn:End Sub Sub LeftOutlane_unHit:Controller.Switch(63)=0:DOF 107, DOFOff:End Sub Sub RightOutlane_Hit:Controller.Switch(63)=1:DOF 108, DOFOn:End Sub Sub RightOutlane_UnHit:Controller.Switch(63)=0:DOF 108, DOFOff:End Sub Sub Drain_Hit()PlaysoundAt "drain", Drain:bsTrough.AddBall Me:End Sub 'switch 67 Sub Trigger4_Hit:Controller.Switch(71)=1:End Sub Sub Trigger4_unHit:Controller.switch(71)=0:End Sub Sub LeftSlingShot_Slingshot VpmTimer.PulseSw 73 PlaySoundAt SoundFX("sling",DOFContactors), slingL DOF 101,DOFPulse LSling.Visible = 0 LSling1.Visible = 1 slingL.rotx = 20 me.uservalue = 1 Me.TimerEnabled = 1 End Sub Sub LeftSlingShot_Timer Select Case me.uservalue Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:slingL.rotx = 10 Case 4:slingL.rotx = 0:LSLing2.Visible = 0:LSLing.Visible = 1:me.TimerEnabled = 0 End Select me.uservalue = me.uservalue + 1 End Sub Sub RightSlingShot_Slingshot VpmTimer.PulseSw 73 PlaySoundAt SoundFX("sling2",DOFContactors), slingR DOF 102,DOFPulse RSling.Visible = 0 RSling1.Visible = 1 slingR.rotx = 20 me.uservalue = 1 Me.TimerEnabled = 1 End Sub Sub RightSlingShot_Timer Select Case me.uservalue Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:slingR.rotx = 10 Case 4:slingR.rotx = 0:RSLing2.Visible = 0:RSLing.Visible = 1:me.TimerEnabled = 0 End Select me.uservalue = me.uservalue + 1 End Sub Sub Spinner_Spin vpmTimer.PulseSw 74 PlaySound "fx_spinner", 0, .25, AudioPan(Spinner), 0.25, 0, 0, 1, AudioFade(Spinner) End Sub '****Targets*** Sub Target1_hit:vpmTimer.PulseSw 62:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub Sub Target2_hit:vpmTimer.PulseSw 52:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub Sub Target3_hit:vpmTimer.PulseSw 42:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub Sub Target4_hit:vpmTimer.PulseSw 72:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub Sub Target5_dropped:vpmTimer.PulseSw 40:PlaySoundAtBall SoundFX("fx_target",DOFDropTargets):End Sub Sub Target6_dropped:vpmTimer.PulseSw 50:PlaySoundAtBall SoundFX("fx_target",DOFDropTargets):End Sub Sub Target7_dropped:vpmTimer.PulseSw 60:PlaySoundAtBall SoundFX("fx_target",DOFDropTargets):End Sub Sub Target8_hit:vpmTimer.PulseSw 70:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub '****Lights*** set lights(3)=Light3 set lights(4)=light4 set lights(5)=light5 set lights(6)=light6 set lights(7)=light7 set lights(12)=light12 set lights(13)=light13 set lights(14)=light14 set lights(15)=light15 set lights(16)=light16 set lights(17)=light17 set lights(18)=light18 set lights(19)=light19 set lights(20)=light20 set lights(21)=light21 set lights(22)=light22 set lights(23)=light23 set lights(24)=light24 set lights(25)=light25 set lights(26)=light26 set lights(27)=light27 set lights(28)=light28 set lights(29)=light29 set lights(30)=light30 set lights(31)=light31 set lights(32)=light32 set lights(33)=light33 set lights(34)=light34 set lights(35)=light35 set lights(36)=light36 set lights(37)=light37 set lights(38)=light38 set lights(39)=light39 set lights(40)=light40 set lights(41)=light41 set lights(42)=light42 set lights(43)=light43 set lights(44)=light44 set lights(45)=light45 set lights(46)=light46 set lights(47)=light47 set lights(48)=light48 set lights(49)=light49 set lights(50)=light50 set lights(51)=light51 'Gottlieb Ice Fever 'added by Inkochnito Sub editDips Dim vpmDips : Set vpmDips = New cvpmDips With vpmDips .AddForm 700,400,"Ice Fever - DIP switches" .AddFrame 0,0,190,"Maximum credits",49152,Array("8 credits",0,"10 credits",32768,"15 credits",&H00004000,"20 credits",49152)'dip 15&16 .AddFrame 0,76,190,"Coin chute 1 and 2 control",&H00002000,Array("seperate",0,"same",&H00002000)'dip 14 .AddFrame 0,122,190,"3rd coin chute credits control",&H20000000,Array("no effect",0,"add 9",&H20000000)'dip 30 .AddFrame 0,168,190,"Novelty mode",&H08000000,Array("normal game mode",0,"50K per special/extra ball",&H08000000)'dip 28 .AddFrame 0,214,190,"Background sound volume",&H40000000,Array("half volume",0,"full volume",&H40000000)'dip 31 .AddFrame 205,0,190,"High score to date awards",&H00C00000,Array("not displayed and no award",0,"displayed and no award",&H00800000,"displayed and 2 credits",&H00400000,"displayed and 3 credits",&H00C00000)'dip 23&24 .AddFrame 205,76,190,"Game mode",&H10000000,Array("replay",0,"extra ball",&H10000000)'dip 29 .AddFrame 205,122,190,"Playfield special",&H00200000,Array("replay",0,"extra ball",&H00200000)'dip 22 .AddFrame 205,168,190,"Replay limit",&H04000000,Array("no limit",0,"one per game",&H04000000)'dip 27 .AddFrame 205,214,190,"Balls per game",&H01000000,Array("5 balls",0,"3 balls",&H01000000)'dip 25 .AddChk 205,265,190,Array("Match feature",&H02000000)'dip 26 .AddChk 0,265,190,Array("Spare (game option)",&H80000000)'dip 32 .AddLabel 50,290,300,20,"After hitting OK, press F3 to reset game with new settings." .ViewDips End With End Sub Set vpmShowDips = GetRef("editDips") Sub Gate1_Hit: PlaySoundAtBall "Gate" : End Sub Sub Gate2_Hit: PlaySoundAtBall "Gate" : End Sub '********************************************************************* ' Positional Sound Playback Functions '********************************************************************* ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only) ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1)) ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart) PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj) End Sub ' Similar subroutines that are less complicated to use (e.g. simply use standard parameters for the PlaySound call) Sub PlaySoundAt(soundname, tableobj) PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) End Sub Sub PlaySoundAtBall(soundname) PlaySoundAt soundname, ActiveBall End Sub '************************************************************************** ' Additional Positional Sound Playback Functions by DJRobX '************************************************************************** Sub PlaySoundAtVol(sound, tableobj, Vol) PlaySound sound, 1, Vol, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) End Sub 'Set position at table object, vol, and loops manually. Sub PlaySoundAtVolLoops(sound, tableobj, Vol, Loops) PlaySound sound, Loops, Vol, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj) End Sub '********************************************************************* ' Supporting Ball & Sound Functions '********************************************************************* Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table Dim tmp tmp = tableobj.y * 2 / Table1.height-1 If tmp > 0 Then AudioFade = Csng(tmp ^10) Else AudioFade = Csng(-((- tmp) ^10) ) End If End Function Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table Dim tmp tmp = tableobj.x * 2 / Table1.width-1 If tmp > 0 Then AudioPan = Csng(tmp ^10) Else AudioPan = Csng(-((- tmp) ^10) ) End If End Function Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed Vol = Csng(BallVel(ball) ^2 / 2000) End Function Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed Pitch = BallVel(ball) * 20 End Function Function BallVel(ball) 'Calculates the ball speed BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) ) End Function '***************************************** ' JP's VP10 Rolling Sounds '***************************************** Const tnob = 5 ' total number of balls ReDim rolling(tnob) InitRolling Sub InitRolling Dim i For i = 0 to tnob rolling(i) = False Next End Sub Sub RollingTimer_Timer() Dim BOT, b BOT = GetBalls ' stop the sound of deleted balls For b = UBound(BOT) + 1 to tnob rolling(b) = False StopSound("fx_ballrolling" & b) Next ' exit the sub if no balls on the table If UBound(BOT) = -1 Then Exit Sub ' play the rolling sound for each ball 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)), AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b)) Else If rolling(b) = True Then StopSound("fx_ballrolling" & b) rolling(b) = False End If End If Next End Sub '********************** ' Ball Collision Sound '********************** Sub OnBallBallCollision(ball1, ball2, velocity) PlaySound("fx_collide"), 0, Csng(velocity) ^2 / (VolDiv/VolCol), AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1) End Sub '***************************************** ' BALL SHADOW by ninnuzu '***************************************** Dim BallShadow BallShadow = Array (BallShadow1,BallShadow2,BallShadow3,BallShadow4,BallShadow5) Sub BallShadowUpdate_timer() Dim BOT, b Dim maxXoffset maxXoffset=13 BOT = GetBalls ' render the shadow for each ball For b = 0 to UBound(BOT) BallShadow(b).X = BOT(b).X-maxXoffset*(1-(Bot(b).X)/(Table1.Width/2)) BallShadow(b).Y = BOT(b).Y + 10 If BOT(b).Z > 0 and BOT(b).Z < 30 Then BallShadow(b).visible = 1 Else BallShadow(b).visible = 0 End If Next End Sub Sub a_Triggers_Hit (idx) 'debug.print "Trigger hit" playsound "fx_sensor", 0,1,AudioPan(ActiveBall),0,0,0,1,AudioFade(ActiveBall) End sub Sub a_Pins_Hit (idx) 'debug.print "Pins hit" PlaySound "pinhit_low", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) End Sub Sub a_Targets_Hit (idx) PlaySound "target", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) End Sub Sub a_DropTargets_Hit (idx) PlaySound "DTDrop", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) End Sub Sub a_Metals_Thin_Hit (idx) 'debug.print "Metals Thin hit" PlaySound "metalhit_thin", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End Sub Sub a_Metals_Medium_Hit (idx) PlaySound "metalhit_medium", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End Sub Sub a_Metals2_Hit (idx) 'debug.print "Metals2 hit" PlaySound "metalhit2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End Sub Sub a_Gates_Hit (idx) PlaySound "gate4", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End Sub 'Sub Spinner_Spin ' PlaySound "fx_spinner", 0, .25, AudioPan(Spinner), 0.25, 0, 0, 1, AudioFade(Spinner) 'End Sub Sub a_Rubbers_Hit(idx) dim finalspeed finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely) If finalspeed > 20 then PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End if If finalspeed >= 6 AND finalspeed <= 20 then RandomSoundRubber() End If End Sub Sub a_Posts_Hit(idx) dim finalspeed finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely) If finalspeed > 16 then PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End if If finalspeed >= 6 AND finalspeed <= 16 then RandomSoundRubber() End If End Sub Sub RandomSoundRubber() Select Case Int(Rnd*3)+1 Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End Select End Sub Sub LeftFlipper_Collide(parm) RandomSoundFlipper() End Sub Sub RightFlipper_Collide(parm) RandomSoundFlipper() End Sub Sub RandomSoundFlipper() Select Case Int(Rnd*3)+1 Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall) End Select End Sub Sub Table1_exit() Controller.Pause = False Controller.Stop End Sub
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
I made $15,000 * 2 hours
CSS | 11 min ago | 0.99 KB
✅ API Glitch (Docs Leak)
CSS | 11 min ago | 0.99 KB
Custom Placeholder: Event Image using alt tag...
12 hours ago | 0.50 KB
Untitled
Bash | 22 hours ago | 1.17 KB
Using Prepared statement with bind vars to pr...
Go | 1 day ago | 3.67 KB
rc
2 days ago | 2.49 KB
Stripe Session Vars
2 days ago | 0.67 KB
[TLF 16] Hylandra's File / Introduction
2 days ago | 3.37 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!