Jump to content



Photo
* * * * * 1 votes

Vector (Bally 1981) [Visual Pinball X]

Vector (Bally 1981) Vector

  • Please log in to reply
56 replies to this topic

#41 Sindbad

Sindbad

    Pinball Freak

  • VIP
  • 364 posts
  • Location:Erbach, Germany

  • Flag: Germany

  • Favorite Pinball: Terminator



Posted 28 March 2017 - 09:30 PM

Okay, I'll try to resume:

 

You added the piece of code, started a game and pressed the 'a' key, correct? Ball goes into the upper kicker (let's use upper, middle and lower instead of first, second, etc. That prevents from misunderstandings), and is ejected in upper direction, correct?

 

Did you also swap the solnumbers? What happened then?



#42 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 28 March 2017 - 09:35 PM

ejects a ball up constantly



#43 Sindbad

Sindbad

    Pinball Freak

  • VIP
  • 364 posts
  • Location:Erbach, Germany

  • Flag: Germany

  • Favorite Pinball: Terminator



Posted 28 March 2017 - 09:40 PM

which direction?

 

I just saw it ... up...


Hmmm... That couldn't be... 

 

Paste the lines from your script here, it should look like this:

 

'*************************************************************
'Solenoid Call backs
'**********************************************************************************************************
 
SolCallback(1)       = "dtU.SolDropUp"         ' Top Bank       Target Reset    (1)
SolCallback(2)       = "dtL.SolDropUp"         ' Bot Bank Low   Target Reset    (7)
SolCallback(4)       = "dtLL.SolDropUp"         ' Top Bank Upper Target Reset    (6)
SolCallback(3) = "bsSaucerL.SolOut" ' Saucer (Lower Left)       Release
SolCallback(5) = "bsSaucerR.SolOut" ' Saucer (Lower Right)      Release
SolCallback(6)        = "vpmSolSound SoundFX(""Knocker"",DOFKnocker),"        ' Knocker     (4)
SolCallback(7)       = "bsTrough.SolOut"    ' Outhole Kicker (5)  (Ball Release)
SolCallback(10) = "bsSaucer3.SolOut" ' Saucer (2nd Floor Top)    Release
SolCallback(9) = "bsSaucer3.SolOutAlt" ' Saucer (2nd Floor Top)    Release
SolCallback(11) = "bsSaucer2.SolOut" ' Saucer (2nd Floor Mid)    Release
SolCallback(12) = "bsSaucer1.SolOut" ' Saucer (2nd Floor Bottom) Release
SolCallback(18)     = ""        ' Coin Box (lockout) ()
SolCallback(19)     = "RelayAC" ' K1 Relay (Flipper Enable)()
 
' These are reassigned in the Solenoid Timer Handler via Lamp 63 as a Selection Switch in VPM
SolCallback(31) = "Drop1" ' Lower Top Drop Target Down 1
SolCallback(32) = "Drop2" ' Lower Top Drop Target Down 2
SolCallback(33) = "Drop3" ' Lower Top Drop Target Down 3
SolCallback(34) = "Drop4" ' Lower Bot Drop Target Down 1
SolCallback(35) = "Drop5" ' Lower Bot Drop Target Down 2
SolCallback(36) = "Drop6" ' Lower Bot Drop Target Down 3
 
SolCallback(sLRFlipper) = "SolRFlipper"

SolCallback(sLLFlipper) = "SolLFlipper" 


Edited by Sindbad, 28 March 2017 - 09:39 PM.


#44 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 28 March 2017 - 09:42 PM

first holes ejected up(from whence it came) :tapping:



#45 Sindbad

Sindbad

    Pinball Freak

  • VIP
  • 364 posts
  • Location:Erbach, Germany

  • Flag: Germany

  • Favorite Pinball: Terminator



Posted 28 March 2017 - 09:44 PM

Okay, could you please paste the lines from your script here, so I can have a look on it?



#46 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 28 March 2017 - 09:50 PM

which direction?

 

I just saw it ... up...


Hmmm... That couldn't be... 

 

Paste the lines from your script here, it should look like this:

 

'*************************************************************
'Solenoid Call backs
'**********************************************************************************************************
 
SolCallback(1)       = "dtU.SolDropUp"         ' Top Bank       Target Reset    (1)
SolCallback(2)       = "dtL.SolDropUp"         ' Bot Bank Low   Target Reset    (7)
SolCallback(4)       = "dtLL.SolDropUp"         ' Top Bank Upper Target Reset    (6)
SolCallback(3) = "bsSaucerL.SolOut" ' Saucer (Lower Left)       Release
SolCallback(5) = "bsSaucerR.SolOut" ' Saucer (Lower Right)      Release
SolCallback(6)        = "vpmSolSound SoundFX(""Knocker"",DOFKnocker),"        ' Knocker     (4)
SolCallback(7)       = "bsTrough.SolOut"    ' Outhole Kicker (5)  (Ball Release)
SolCallback(10) = "bsSaucer3.SolOut" ' Saucer (2nd Floor Top)    Release
SolCallback(9) = "bsSaucer3.SolOutAlt" ' Saucer (2nd Floor Top)    Release
SolCallback(11) = "bsSaucer2.SolOut" ' Saucer (2nd Floor Mid)    Release
SolCallback(12) = "bsSaucer1.SolOut" ' Saucer (2nd Floor Bottom) Release
SolCallback(18)     = ""        ' Coin Box (lockout) ()
SolCallback(19)     = "RelayAC" ' K1 Relay (Flipper Enable)()
 
' These are reassigned in the Solenoid Timer Handler via Lamp 63 as a Selection Switch in VPM
SolCallback(31) = "Drop1" ' Lower Top Drop Target Down 1
SolCallback(32) = "Drop2" ' Lower Top Drop Target Down 2
SolCallback(33) = "Drop3" ' Lower Top Drop Target Down 3
SolCallback(34) = "Drop4" ' Lower Bot Drop Target Down 1
SolCallback(35) = "Drop5" ' Lower Bot Drop Target Down 2
SolCallback(36) = "Drop6" ' Lower Bot Drop Target Down 3
 
SolCallback(sLRFlipper) = "SolRFlipper"

SolCallback(sLLFlipper) = "SolLFlipper" 

Ok somewhere I was wrong,,

Now is ejected in the third hole


Option Explicit
Randomize

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

Const cGameName="vector",UseSolenoids=1,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff", SCoin="coin"

LoadVPM "01130100", "Bally.VBS", 3.21
Dim DesktopMode: DesktopMode = Table1.ShowDT

If DesktopMode = True Then 'Show Desktop components
Ramp16.visible=1
Ramp15.visible=1
Primitive13.visible=1
Else
Ramp16.visible=0
Ramp15.visible=0
Primitive13.visible=0
End if

'*************************************************************
'Solenoid Call backs
'**********************************************************************************************************

SolCallback(1)       = "dtU.SolDropUp"         ' Top Bank       Target Reset    (1)
SolCallback(2)       = "dtL.SolDropUp"         ' Bot Bank Low   Target Reset    (7)
SolCallback(4)       = "dtLL.SolDropUp"         ' Top Bank Upper Target Reset    (6)
SolCallback(3) = "bsSaucerL.SolOut" ' Saucer (Lower Left)       Release
SolCallback(5) = "bsSaucerR.SolOut" ' Saucer (Lower Right)      Release
SolCallback(6)        = "vpmSolSound SoundFX(""Knocker"",DOFKnocker),"        ' Knocker     (4)
SolCallback(7)       = "bsTrough.SolOut"    ' Outhole Kicker (5)  (Ball Release)
SolCallback(10) = "bsSaucer3.SolOut" ' Saucer (2nd Floor Top)    Release
SolCallback(9) = "bsSaucer3.SolOutAlt" ' Saucer (2nd Floor Top)    Release
SolCallback(11) = "bsSaucer2.SolOut" ' Saucer (2nd Floor Mid)    Release
SolCallback(12) = "bsSaucer1.SolOut" ' Saucer (2nd Floor Bottom) Release
SolCallback(18)     = ""        ' Coin Box (lockout) ()
SolCallback(19)     = "RelayAC" ' K1 Relay (Flipper Enable)()
 
' These are reassigned in the Solenoid Timer Handler via Lamp 63 as a Selection Switch in VPM
SolCallback(31) = "Drop1" ' Lower Top Drop Target Down 1
SolCallback(32) = "Drop2" ' Lower Top Drop Target Down 2
SolCallback(33) = "Drop3" ' Lower Top Drop Target Down 3
SolCallback(34) = "Drop4" ' Lower Bot Drop Target Down 1
SolCallback(35) = "Drop5" ' Lower Bot Drop Target Down 2
SolCallback(36) = "Drop6" ' Lower Bot Drop Target Down 3
 
SolCallback(sLRFlipper) = "SolRFlipper"
SolCallback(sLLFlipper) = "SolLFlipper" 

Sub SolLFlipper(Enabled)
     If Enabled Then
         PlaySound SoundFX("fx_Flipperup",DOFContactors):LeftFlipper.RotateToEnd:LeftFlipper1.RotateToEnd
     Else
         PlaySound SoundFX("fx_Flipperdown",DOFContactors):LeftFlipper.RotateToStart:LeftFlipper1.RotateToStart
     End If
  End Sub
  
Sub SolRFlipper(Enabled)
     If Enabled Then
         PlaySound SoundFX("fx_Flipperup",DOFContactors):RightFlipper.RotateToEnd:RightFlipper1.RotateToEnd
     Else
         PlaySound SoundFX("fx_Flipperdown",DOFContactors):RightFlipper.RotateToStart:RightFlipper1.RotateToStart
     End If
End Sub

'**********************************************************************************************************

Sub FlipperTimer_Timer
	FlipperT1.roty = LeftFlipper1.currentangle  + 0
	FlipperT2.roty = RightFlipper1.currentangle + 0
 	Prim2.Rotz = Gate2.Currentangle 
	Prim3.Rotz = Gate3.Currentangle 
	Prim4.Rotz = Gate4.Currentangle 
	Prim5.Rotz = Gate5.Currentangle
	Prim6.Rotz = Gate6.Currentangle 
	Prim14.Rotz = sw14.Currentangle  
End Sub

 Sub Drop1(enabled) : If enabled then : sw31_Dropped : end if : End Sub
 Sub Drop2(enabled) : If enabled then : sw30_Dropped : end if : End Sub
 Sub Drop3(enabled) : If enabled then : sw29_Dropped : end if : End Sub
 Sub Drop4(enabled) : If enabled then : sw28_Dropped : end if : End Sub
 Sub Drop5(enabled) : If enabled then : sw27_Dropped : end if : End Sub
 Sub Drop6(enabled) : If enabled then : sw26_Dropped : end if : End Sub

 Sub Solenoid_Timer()
	Dim Changed, Count, funcName, ii, sel, solNo
	Changed = Controller.ChangedSolenoids
	If Not IsEmpty(Changed) Then
		sel = Controller.Lamp(63)
		Count = UBound(Changed, 1)
		For ii = 0 To Count
			solNo = Changed(ii, CHGNO)
			If SolNo >= 7 And SolNo <= 12 And sel Then solNo = solNo +24
			funcName = SolCallback(solNo)
			If funcName <> "" Then Execute funcName & " CBool(" & Changed(ii, CHGSTATE) &")"
		Next
	End If
End Sub

 'Handle Solenoid Events
Sub SolTimer_Timer()
	Dim ChgSol, tmp, ii, CBoard, solnum
	ChgSol  = Controller.ChangedSolenoids
	If Not IsEmpty(ChgSol) Then
 	CBoard = Controller.Lamp(63)
		For ii = 0 To UBound(ChgSol)
 			solnum = ChgSol(ii, 0)
 			If solnum <= 12 and CBoard Then solnum = solnum + 24
 			tmp = Solcallback(solnum)
			If tmp <> "" Then Execute tmp & vpmTrueFalse(ChgSol(ii, 1)+1)
		Next
	End If
End Sub

' Tie In Nudge to AC Relay
Sub RelayAC(enabled)
	vpmNudge.SolGameOn enabled  		
End Sub

'**********************************************************************************************************
'Initiate Table
'**********************************************************************************************************

Dim bsTrough, bsSaucerL, SLMagnet, bsSaucerR, SRMagnet, bsSaucer1, bsSaucer2, bsSaucer3, DTL, DTLL, DTU

Sub Table1_Init
	vpmInit Me
	On Error Resume Next
		With Controller
		.GameName = cGameName
		If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub
		.SplashInfoLine = "Vector (Bally)"&chr(13)&"You Suck"
		.HandleMechanics=0
		.HandleKeyboard=0
		.ShowDMDOnly=1
		.ShowFrame=0
		.ShowTitle=0
        .hidden = 1
		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
	If Err Then MsgBox Err.Description
	On Error Goto 0

	PinMAMETimer.Interval=PinMAMEInterval
	PinMAMETimer.Enabled=1

	vpmNudge.TiltSwitch  = 15
	vpmNudge.Sensitivity = 5
	vpmNudge.Tiltobj = Array(LeftSlingshot,RightSlingshot,Bumper1) ' Slings and Pop Bumpers

 	' Trough
	Set bsTrough = New cvpmBallStack
		bsTrough.Initsw 0,3,2,1,0,0,0,0
 		bsTrough.InitKick BallRelease,90,25
 		bsTrough.InitExitSnd SoundFX("ballrelease",DOFContactors), SoundFX("Solenoid",DOFContactors)
		bsTrough.Balls = 3
 		bsTrough.IsTrough = True

  	' Saucer (Lower Left)
	Set bsSaucerL = New cvpmBallStack
		bsSaucerL.InitSaucer SaucerL,5,78,22
 		bsSaucerL.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

     ' Saucer Magnet Left
    Set SLMagnet = New cvpmMagnet
        SLMagnet.InitMagnet SaucerLeftMagnet, 9
        SLMagnet.GrabCenter = 0
        SLMagnet.MagnetOn = 1
        SLMagnet.CreateEvents "SLMagnet"

  	' Saucer (Lower Right)
	Set bsSaucerR = New cvpmBallStack
		bsSaucerR.InitSaucer SaucerR,4,-90,22
 		bsSaucerR.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

     ' Saucer Magnet Right
    Set SRMagnet = New cvpmMagnet
        SRMagnet.InitMagnet SaucerRightMagnet, 9
        SRMagnet.GrabCenter = 0
        SRMagnet.MagnetOn = 1
        SRMagnet.CreateEvents "SRMagnet"

  	' Saucer (2nd Floor Bottom)
	Set bsSaucer1 = New cvpmBallStack
		bsSaucer1.InitSaucer Saucer1,17,178,1.20
 		bsSaucer1.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

  	' Saucer (2nd Floor Middle)
	Set bsSaucer2 = New cvpmBallStack
		bsSaucer2.InitSaucer Saucer2,18,180,20
 		bsSaucer2.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

  	' Saucer (2nd Floor Top)
	Set bsSaucer3 = New cvpmBallStack
		bsSaucer3.InitSaucer Saucer3,19,340,20
 		bsSaucer3.Initaltkick 160,10
 		bsSaucer3.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

  	Set dtL=New cvpmDropTarget
		dtL.InitDrop Array(sw26,sw27,sw28),Array(26,27,28)
		dtL.InitSnd SoundFX("DTDrop",DOFContactors),SoundFX("DTReset",DOFContactors)

 	Set dtLL=New cvpmDropTarget
		dtLL.InitDrop Array(sw29,sw30,sw31),Array(29,30,31)
		dtLL.InitSnd SoundFX("DTDrop",DOFContactors),SoundFX("DTReset",DOFContactors)

 	Set dtU=New cvpmDropTarget
		dtU.InitDrop Array(sw46,sw47,sw48),Array(46,47,48)
		dtU.InitSnd SoundFX("DTDrop",DOFContactors),SoundFX("DTReset",DOFContactors)

 End Sub
 
'**********************************************************************************************************
'Plunger code
'**********************************************************************************************************

Sub Table1_KeyDown(ByVal KeyCode)
	If KeyDownHandler(keycode) Then Exit Sub
	If keycode = PlungerKey Then Plunger.Pullback:playsound"plungerpull"
If keycode = 30 Then
     ActiveBall.X = 856
     ActiveBall.Y = 151
     ActiveBall.Z = 90
End If
End Sub


Sub Table1_KeyUp(ByVal KeyCode)
	If KeyUpHandler(keycode) Then Exit Sub
	If keycode = PlungerKey Then Plunger.Fire:PlaySound"plunger"
End Sub

'**********************************************************************************************************

 ' Drain and Kickers
Sub Drain_Hit:playsound"drain":bsTrough.addball me:End Sub
Sub Saucer1_Hit:bsSaucer1.addball me : playsound"popper_ball" : End Sub  
Sub Saucer2_Hit:bsSaucer2.addball me : playsound"popper_ball" : End Sub 
Sub Saucer3_Hit:bsSaucer3.addball me : playsound"popper_ball" : End Sub 
Sub SaucerL_Hit:bsSaucerL.addball me : playsound"popper_ball" : End Sub 
Sub SaucerR_Hit:bsSaucerR.addball me : playsound"popper_ball" : End Sub 

'Gate Trigger
Sub sw14_Hit()   	  : controller.switch (14)=1: End Sub 
Sub sw14_unHit() 	  : controller.switch (14)=0:End Sub

'Wire Triggers
Sub sw12_Hit()   	  : controller.switch (12)=1 : playsound"rollover" : End Sub  
Sub sw12_unHit() 	  : controller.switch (12)=0:End Sub
Sub sw13_Hit()		  : controller.switch (13)=1 : playsound"rollover" : End Sub 
Sub sw13_unHit()	  : controller.switch (13)=0:End Sub
Sub sw33_Hit()   	  : controller.switch (33)=1 : playsound"rollover" : End Sub
Sub sw33_unHit() 	  : controller.switch (33)=0:End Sub
Sub sw34_Hit()   	  : controller.switch (34)=1 : playsound"rollover" : End Sub 
Sub sw34_unHit() 	  : controller.switch (34)=0:End Sub
Sub sw35_Hit()   	  : controller.switch (35)=1 : playsound"rollover" : End Sub 
Sub sw35_unHit() 	  : controller.switch (35)=0:End Sub
Sub sw36_Hit()   	  : controller.switch (36)=1 : playsound"rollover" : End Sub 
Sub sw36_unHit() 	  : controller.switch (36)=0:End Sub

'Star Triggers
Sub sw37_Hit()   	  : controller.switch (37)=1 : playsound"rollover" : End Sub 
Sub sw37_unHit() 	  : controller.switch (37)=0:End Sub

'Bumpers
Sub Bumper1_Hit : vpmTimer.PulseSw(40) : playsound SoundFX("fx_bumper1",DOFContactors): End Sub

 'Stand Up Targets
 Sub sw21_Hit : vpmTimer.PulseSw(21) : End Sub 
 Sub sw22_Hit : vpmTimer.PulseSw(22): End Sub 
 Sub sw23_Hit : vpmTimer.PulseSw(23) : End Sub 
 Sub sw24_Hit : vpmTimer.PulseSw(24) : End Sub 

'Drop Targets
 Sub Sw26_Dropped:dtL.Hit 1 :End Sub  
 Sub Sw27_Dropped:dtL.Hit 2 :End Sub  
 Sub Sw28_Dropped:dtL.Hit 3 :End Sub

'Drop Targets
 Sub Sw29_Dropped:dtLL.Hit 1 :End Sub  
 Sub Sw30_Dropped:dtLL.Hit 2 :End Sub  
 Sub Sw31_Dropped:dtLL.Hit 3 :End Sub

'Drop Targets
 Sub Sw46_Dropped:dtU.Hit 1 :End Sub  
 Sub Sw47_Dropped:dtU.Hit 2 :End Sub  
 Sub Sw48_Dropped:dtU.Hit 3 :End Sub



set Lights(2) = L2
set Lights(3) = L3
set Lights(4) = L4
set Lights(6) = L6
set Lights(8) = L8
set Lights(9) = L9
set Lights(10) = L10
set Lights(12) = L12				' Pop Bumper Plastic

set Lights(14) = L14
set Lights(15) = L15
set Lights(18) = L18
set Lights(19) = L19
set Lights(20) = L20
set Lights(21) = L21
set Lights(22) = L22
set Lights(23) = L23
set Lights(24) = L24
set Lights(25) = L25
set Lights(26) = L26

set Lights(28) = L28

set Lights(30) = L30
set Lights(31) = L31
Lights(33)=array(L33,L33a,L33b,L33c,L33d,L33e)   'Lower PF GI???????????????
set Lights(34) = L34
set Lights(35) = L35
set Lights(36) = L36
set Lights(37) = L37
set Lights(38) = L38
set Lights(39) = L39
set Lights(40) = L40
set Lights(41) = L41
set Lights(42) = L42
set Lights(43) = L43
set Lights(44) = L44

set Lights(46) = L46
set Lights(47) = L47
Lights(49)=array(L49,L49a,L49b,L49c,L49d,L49e,L49f)   'UPPER PF GI???????????????
set Lights(50) = L50
set Lights(51) = L51
set Lights(52) = L52
set Lights(53) = L53
set Lights(54) = L54
set Lights(55) = L55
set Lights(56) = L56
set Lights(57) = L57
set Lights(58) = L58
set Lights(59) = L59
set Lights(60) = L60

set Lights(62) = L62

Lights(65) =  array(l65,l67a)
set Lights(66) = L66
Lights(67) = array(L67,l67a)
Lights(81) =  array(l81,l81a)
Set Lights(82) = L82
Set Lights(83) = L83				' Plunger Flasher
Lights(97) =  array(l97,l97a)
set Lights(98) = L98
set Lights(99) = L99
Lights(113) =  array(l113,l113a)
Lights(114) =  array(l114,l114a)
set Lights(115) = L115

'Backglass Lights
'set Lights(11) = L11					' Shoot Again
'set Lights(13) = L13					' Ball In Play
'set Lights(27) = L27					' Match
'set Lights(29) = L29					' High Score
'set Lights(45) = L45					' Game Over
'set Lights(61) = L61					' Tilt


'**********************************************************************************************************
'Digital Display
'**********************************************************************************************************

Dim Digits(40)
Digits(0)=Array(b00,b01,b02,b03,b04,b05,b06)
Digits(1)=Array(b10,b11,b12,b13,b14,b15,b16)
Digits(2)=Array(b20,b21,b22,b23,b24,b25,b26)
Digits(3)=Array(b30,b31,b32,b33,b34,b35,b36)
Digits(4)=Array(b40,b41,b42,b43,b44,b45,b46)
Digits(5)=Array(b50,b51,b52,b53,b54,b55,b56)
Digits(6)=Array(b60,b61,b62,b63,b64,b65,b66)
Digits(7)=Array(b70,b71,b72,b73,b74,b75,b76)
Digits(8)=Array(b80,b81,b82,b83,b84,b85,b86)
Digits(9)=Array(b90,b91,b92,b93,b94,b95,b96)
Digits(10)=Array(ba0,ba1,ba2,ba3,ba4,ba5,ba6)
Digits(11)=Array(bb0,bb1,bb2,bb3,bb4,bb5,bb6)
Digits(12)=Array(bc0,bc1,bc2,bc3,bc4,bc5,bc6)
Digits(13)=Array(bd0,bd1,bd2,bd3,bd4,bd5,bd6)
Digits(14)=Array(be0,be1,be2,be3,be4,be5,be6)
Digits(15)=Array(bf0,bf1,bf2,bf3,bf4,bf5,bf6)
Digits(16)=Array(bg0,bg1,bg2,bg3,bg4,bg5,bg6)
Digits(17)=Array(bh0,bh1,bh2,bh3,bh4,bh5,bh6)
Digits(18)=Array(bi0,bi1,bi2,bi3,bi4,bi5,bi6)
Digits(19)=Array(bj0,bj1,bj2,bj3,bj4,bj5,bj6)
Digits(20)=Array(bk0,bk1,bk2,bk3,bk4,bk5,bk6)
Digits(21)=Array(bl0,bl1,bl2,bl3,bl4,bl5,bl6)
Digits(22)=Array(bm0,bm1,bm2,bm3,bm4,bm5,bm6)
Digits(23)=Array(bn0,bn1,bn2,bn3,bn4,bn5,bn6)
Digits(24)=Array(bo0,bo1,bo2,bo3,bo4,bo5,bo6)
Digits(25)=Array(bp0,bp1,bp2,bp3,bp4,bp5,bp6)
Digits(26)=Array(bq0,bq1,bq2,bq3,bq4,bq5,bq6)
Digits(27)=Array(br0,br1,br2,br3,br4,br5,br6)
Digits(28)=Array(bs0,bs1,bs2,bs3,bs4,bs5,bs6)
Digits(29)=Array(bt0,bt1,bt2,bt3,bt4,bt5,bt6)
Digits(30)=Array(bu0,bu1,bu2,bu3,bu4,bu5,bu6)
Digits(31)=Array(bv0,bv1,bv2,bv3,bv4,bv5,bv6)
Digits(32)=Array(a00,a01,a02,a03,a04,a05,a06)
Digits(33)=Array(a10,a11,a12,a13,a14,a15,a16)
Digits(34)=Array(a20,a21,a22,a23,a24,a25,a26)
Digits(35)=Array(a30,a31,a32,a33,a34,a35,a36)
Digits(36)=Array(a40,a41,a42,a43,a44,a45,a46)
Digits(37)=Array(a50,a51,a52,a53,a54,a55,a56)

Sub DisplayTimer_Timer
	Dim ChgLED,ii,num,chg,stat,obj
	ChgLed = Controller.ChangedLEDs(&Hffffffff, &Hffffffff)
If Not IsEmpty(ChgLED) Then
		For ii = 0 To UBound(chgLED)
			num = chgLED(ii, 0) : chg = chgLED(ii, 1) : stat = chgLED(ii, 2)
			if (num < 38) then
				For Each obj In Digits(num)
					If chg And 1 Then obj.State = stat And 1 
					chg = chg\2 : stat = stat\2
				Next
			else
			end if
		next
end if
End Sub

'if Full Screen turn off Backglas Components but keep PF LED displays on
If DesktopMode = True Then
dim xxx
For each xxx in BG:xxx.Visible = 1: Next
else
For each xxx in BG:xxx.Visible = 0: Next
End if


'Bally Vector
'added by Inkochnito
Sub editDips
	Dim vpmDips : Set vpmDips = New cvpmDips
	With vpmDips
		.AddForm 700,400,"Vector - DIP switches"
		.AddChk 7,10,180,Array("Match feature", &H08000000)'dip 28
		.AddChk 205,10,115,Array("Credits display", &H04000000)'dip 27
		.AddFrame 2,30,190,"Maximum credits",&H03000000,Array("10 credits",0,"15 credits", &H01000000,"25 credits", &H02000000,"40 credits", &H03000000)'dip 25&26
		.AddFrame 2,106,190,"Making 3 upper left targets will",&H00000020,Array("reset 3 lower targets",0,"not reset 3 lower targets",&H00000020)'dip 6
		.AddFrame 2,152,190,"Multipiers lite will",&H00000040,Array("be off then alternate",0,"stay on till bonus lites are made",&H00000040)'dip 7
		.AddFrame 2,198,190,"X-Y-Z drop targets special",&H00000080,Array("25K - special - 25K",0,"25K - special keeps alternating",&H00000080)'dip 8
		.AddFrame 2,248,190,"Vectorscan to date readout",&H00002000,Array("can only be decreased manually",0,"after 8 games decrease by 20K",&H00002000)'dip 14
		.AddFrame 2,298,190,"With Vectorscan capture lite on",&H00004000,Array("3 lower targets will reset",0,"3 lower targets will go back down",&H00004000)'dip 15
		.AddFrame 2,348,190,"With Vectorscan capture lite off",32768,Array("targets down will reset",0,"any target down will go back down",32768)'dip 16
		.AddFrame 205,30,190,"Balls per game",&HC0000000,Array ("2 balls",&HC0000000,"3 balls",0,"4 balls",&H80000000,"5 balls",&H40000000)'dip 31&32
		.AddFrame 205,106,190,"Vectorscan bonus score readout",&H00100000,Array("readout will reset to 1",0,"readout will come back on",&H00100000)'dip 21
		.AddFrame 205,152,190,"Attract sound",&H00200000,Array("no voice",0,"voice says 'I am P.A.C. play analysis",&H00200000)'dip 22
		.AddFrame 205,198,190,"Vectorscan scoring adjust",&H00400000,Array("scores only when capture lite is on",0,"scores when capture lite is on or off",&H00400000)'dip 23
		.AddFrame 205,248,190,"Lite special and extra ball when",&H00800000,Array("hitting vector speed 800 or over",0,"hitting vector speed 750 or over",&H00800000)'dip 24
		.AddFrame 205,298,190,"Replay limit",&H10000000,Array("no limit",0,"1 replay per game",&H10000000)'dip 29
		.AddFrame 205,348,190,"H-Y-P-E target bonus adjust",&H20000000,Array("advances bonus only when lit",0,"advances bonus every time",&H20000000)'dip 30
		.AddLabel 50,400,350,20,"Set selftest position 16,17,18 and 19 to 03 for the best gameplay."
		.AddLabel 50,420,300,20,"After hitting OK, press F3 to reset game with new settings."
		.ViewDips
	End With
End Sub
Set vpmShowDips = GetRef("editDips")

' *********************************************************************
' *********************************************************************

					'Start of VPX call back Functions

' *********************************************************************
' *********************************************************************

'**********Sling Shot Animations
' Rstep and Lstep  are the variables that increment the animation
'****************
Dim RStep, Lstep

Sub RightSlingShot_Slingshot
	vpmtimer.pulsesw 38
    PlaySound SoundFX("right_slingshot",DOFContactors), 0, 1, 0.05, 0.05
    RSling.Visible = 0
    RSling1.Visible = 1
    sling1.TransZ = -20
    RStep = 0
    RightSlingShot.TimerEnabled = 1
End Sub

Sub RightSlingShot_Timer
    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

Sub LeftSlingShot_Slingshot
	vpmtimer.pulsesw 39
    PlaySound SoundFX("left_slingshot",DOFContactors),0,1,-0.05,0.05
    LSling.Visible = 0
    LSling1.Visible = 1
    sling2.TransZ = -20
    LStep = 0
    LeftSlingShot.TimerEnabled = 1
End Sub

Sub LeftSlingShot_Timer
    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
' *********************************************************************

Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
    Vol = Csng(BallVel(ball) ^2 / 2000)
End Function

Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
    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

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) ), 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
'**********************

Sub OnBallBallCollision(ball1, ball2, velocity)
	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
'************************************

' a timer called RollingTimer. With a fast interval, like 10
' 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
'******************************************

' sounds are played based on the ball speed and position

' the routine checks first for deleted balls and stops the rolling sound.

' The For loop goes through all the balls on the table and checks for the ball speed and 
' 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.

' The sound is played using the VOL, PAN and PITCH functions, so the volume and pitch of the sound
' 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
'**************************************

' The collision is built in VP.
' 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.


Sub Pins_Hit (idx)
	PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Targets_Hit (idx)
	PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Metals_Thin_Hit (idx)
	PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals_Medium_Hit (idx)
	PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals2_Hit (idx)
	PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Gates_Hit (idx)
	PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Spinner_Spin
	PlaySound "fx_spinner",0,.25,0,0.25
End Sub

Sub 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), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
	End if
	If finalspeed >= 6 AND finalspeed <= 20 then
 		RandomSoundRubber()
 	End If
End Sub

Sub 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), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
	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), 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

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), 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



#47 Sindbad

Sindbad

    Pinball Freak

  • VIP
  • 364 posts
  • Location:Erbach, Germany

  • Flag: Germany

  • Favorite Pinball: Terminator



Posted 28 March 2017 - 09:53 PM

Okay, that means the kicker itself works and that's good.

 

Let's try the following: I just tried it here and it works with the suggested modifications from 32a. So I suggest you'll try it with my modified script, you can download it here: https://drive.google...eGNPdDFWU093VW8

 

I need to go to bed now, let's continue tomorrow.


Edited by Sindbad, 29 March 2017 - 05:03 PM.


#48 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 28 March 2017 - 09:55 PM

OK, restful sleep and thank you very much



#49 32assassin

32assassin

    Pinball Fan

  • VIP
  • 853 posts

  • Flag: United States of America

  • Favorite Pinball: terminator 2

Posted 29 March 2017 - 02:05 AM

Ok somewhere I was wrong,,

 

 

Now is ejected in the third hole




Const cGameName="vector",UseSolenoids=1,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff", SCoin="coin"


 

as I stated in the post above

 change this  UseSolenoids=1

to this

UseSolenoids=0


My Files
http://www.vpforums....4de64a621eccd40
My Table List
www.youtube.com/watch?v=DlaxLrXlPOU
See a table you like, help me complete it by finding the missing resources
https://www.dropbox....xTzKtGHTHa?dl=0

#50 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 29 March 2017 - 09:50 AM

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

 

Const cGameName="vector",UseSolenoids=0,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff", SCoin="coin"

 
it does not work

Okay, that means the kicker itself works and that's good.

 

Let's try the following: I just tried it here and it works with the suggested modifications from A32. So I suggest you'll try it with my modified script, you can download it here: https://drive.google...eGNPdDFWU093VW8

 

I need to go to bed now, let's continue tomorrow.

Super we progress, now going into the third hole, but when the ball comes out he is ejected from the hole..

It would have to remain until the last ball



#51 Sindbad

Sindbad

    Pinball Freak

  • VIP
  • 364 posts
  • Location:Erbach, Germany

  • Flag: Germany

  • Favorite Pinball: Terminator



Posted 29 March 2017 - 04:57 PM

Okay, once more my request: Let's use "upper kicker", "middle kicker" and "lower kicker" instead of first, second, third. That prevents from misunderstandings. 

 

I resume: Ball goes now after Vectorscan from upper to middle to lower kicker and stays there until new ball drains, then the ball is ejected from lower kicker, correct?


Sasa,

 

I just had a look at the script I've uploaded. There's still "UseSolenoids=1". You should change it to "UseSolenoids=0". Otherwise this can result in problems (like 32a already mentioned).


Edited by Sindbad, 29 March 2017 - 05:03 PM.


#52 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 29 March 2017 - 05:48 PM

Okay, once more my request: Let's use "upper kicker", "middle kicker" and "lower kicker" instead of first, second, third. That prevents from misunderstandings.  Yes

 

I resume: Ball goes now after Vectorscan from upper to middle to lower kicker and stays there until new ball drains, then the ball is ejected from lower kicker, correct? yes

 

I just had a look at the script I've uploaded. There's still "UseSolenoids=1". You should change it to "UseSolenoids=0". Otherwise this can result in problems (like 32a already mentioned)

To this we did not work so I returned



#53 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 29 March 2017 - 06:11 PM

 

Ok somewhere I was wrong,,

 

 

Now is ejected in the third hole




Const cGameName="vector",UseSolenoids=1,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff", SCoin="coin"


 

as I stated in the post above

 change this  UseSolenoids=1

to this

UseSolenoids=0

 

Option Explicit
Randomize

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

Const cGameName="vector",UseSolenoids=0,UseLamps=1,UseGI=0,SSolenoidOn="SolOn",SSolenoidOff="SolOff", SCoin="coin"

LoadVPM "01130100", "Bally.VBS", 3.21
Dim DesktopMode: DesktopMode = Table1.ShowDT

If DesktopMode = True Then 'Show Desktop components
Ramp16.visible=1
Ramp15.visible=1
Primitive13.visible=1
Else
Ramp16.visible=0
Ramp15.visible=0
Primitive13.visible=0
End if

'*************************************************************
'Solenoid Call backs
'**********************************************************************************************************

SolCallback(1)      		= "dtU.SolDropUp"					        	' Top Bank       Target Reset    (1)
SolCallback(2)      		= "dtL.SolDropUp"					        	' Bot Bank Low   Target Reset    (7)
SolCallback(4)      		= "dtLL.SolDropUp"					        	' Top Bank Upper Target Reset    (6)
SolCallback(3)				= "bsSaucerL.SolOut"						' Saucer (Lower Left)       Release
SolCallback(5)				= "bsSaucerR.SolOut"						' Saucer (Lower Right)      Release
SolCallback(6)		        = "vpmSolSound SoundFX(""Knocker"",DOFKnocker)," 		        ' Knocker     (4)
SolCallback(7)      		= "bsTrough.SolOut"						    ' Outhole Kicker (5)  (Ball Release)
SolCallback(9)				= "bsSaucer3.SolOut"						' Saucer (2nd Floor Top)    Release
					
SolCallback(11)				= "bsSaucer2.SolOut"						' Saucer (2nd Floor Mid)    Release
SolCallback(12)				= "bsSaucer1.SolOut"						' Saucer (2nd Floor Bottom) Release
SolCallback(18)     		= ""								        ' Coin Box (lockout) ()
SolCallback(19)     		= "RelayAC"									' K1 Relay (Flipper Enable)()

' These are reassigned in the Solenoid Timer Handler via Lamp 63 as a Selection Switch in VPM
SolCallback(31)				= "Drop1"									' Lower Top Drop Target Down 1
SolCallback(32)				= "Drop2"									' Lower Top Drop Target Down 2
SolCallback(33)				= "Drop3"									' Lower Top Drop Target Down 3
SolCallback(34)				= "Drop4"									' Lower Bot Drop Target Down 1
SolCallback(35)				= "Drop5"									' Lower Bot Drop Target Down 2
SolCallback(36)				= "Drop6"									' Lower Bot Drop Target Down 3

SolCallback(sLRFlipper) = "SolRFlipper"
SolCallback(sLLFlipper) = "SolLFlipper"

Sub SolLFlipper(Enabled)
     If Enabled Then
         PlaySound SoundFX("fx_Flipperup",DOFContactors):LeftFlipper.RotateToEnd:LeftFlipper1.RotateToEnd
     Else
         PlaySound SoundFX("fx_Flipperdown",DOFContactors):LeftFlipper.RotateToStart:LeftFlipper1.RotateToStart
     End If
  End Sub
  
Sub SolRFlipper(Enabled)
     If Enabled Then
         PlaySound SoundFX("fx_Flipperup",DOFContactors):RightFlipper.RotateToEnd:RightFlipper1.RotateToEnd
     Else
         PlaySound SoundFX("fx_Flipperdown",DOFContactors):RightFlipper.RotateToStart:RightFlipper1.RotateToStart
     End If
End Sub

'**********************************************************************************************************

Sub FlipperTimer_Timer
	FlipperT1.roty = LeftFlipper1.currentangle  + 0
	FlipperT2.roty = RightFlipper1.currentangle + 0
 	Prim2.Rotz = Gate2.Currentangle 
	Prim3.Rotz = Gate3.Currentangle 
	Prim4.Rotz = Gate4.Currentangle 
	Prim5.Rotz = Gate5.Currentangle
	Prim6.Rotz = Gate6.Currentangle 
	Prim14.Rotz = sw14.Currentangle  
End Sub

 Sub Drop1(enabled) : If enabled then : sw31_Dropped : end if : End Sub
 Sub Drop2(enabled) : If enabled then : sw30_Dropped : end if : End Sub
 Sub Drop3(enabled) : If enabled then : sw29_Dropped : end if : End Sub
 Sub Drop4(enabled) : If enabled then : sw28_Dropped : end if : End Sub
 Sub Drop5(enabled) : If enabled then : sw27_Dropped : end if : End Sub
 Sub Drop6(enabled) : If enabled then : sw26_Dropped : end if : End Sub

 Sub Solenoid_Timer()
	Dim Changed, Count, funcName, ii, sel, solNo
	Changed = Controller.ChangedSolenoids
	If Not IsEmpty(Changed) Then
		sel = Controller.Lamp(63)
		Count = UBound(Changed, 1)
		For ii = 0 To Count
			solNo = Changed(ii, CHGNO)
			If SolNo >= 7 And SolNo <= 12 And sel Then solNo = solNo +24
			funcName = SolCallback(solNo)
			If funcName <> "" Then Execute funcName & " CBool(" & Changed(ii, CHGSTATE) &")"
		Next
	End If
End Sub

 'Handle Solenoid Events
Sub SolTimer_Timer()
	Dim ChgSol, tmp, ii, CBoard, solnum
	ChgSol  = Controller.ChangedSolenoids
	If Not IsEmpty(ChgSol) Then
 	CBoard = Controller.Lamp(63)
		For ii = 0 To UBound(ChgSol)
 			solnum = ChgSol(ii, 0)
 			If solnum <= 12 and CBoard Then solnum = solnum + 24
 			tmp = Solcallback(solnum)
			If tmp <> "" Then Execute tmp & vpmTrueFalse(ChgSol(ii, 1)+1)
		Next
	End If
End Sub

' Tie In Nudge to AC Relay
Sub RelayAC(enabled)
	vpmNudge.SolGameOn enabled  		
End Sub

'**********************************************************************************************************
'Initiate Table
'**********************************************************************************************************

Dim bsTrough, bsSaucerL, SLMagnet, bsSaucerR, SRMagnet, bsSaucer1, bsSaucer2, bsSaucer3, DTL, DTLL, DTU

Sub Table1_Init
	vpmInit Me
	On Error Resume Next
		With Controller
		.GameName = cGameName
		If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub
		.SplashInfoLine = "Vector (Bally)"&chr(13)&"You Suck"
		.HandleMechanics=0
		.HandleKeyboard=0
		.ShowDMDOnly=1
		.ShowFrame=0
		.ShowTitle=0
        .hidden = 1
		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
	If Err Then MsgBox Err.Description
	On Error Goto 0

	PinMAMETimer.Interval=PinMAMEInterval
	PinMAMETimer.Enabled=1

	vpmNudge.TiltSwitch  = 15
	vpmNudge.Sensitivity = 5
	vpmNudge.Tiltobj = Array(LeftSlingshot,RightSlingshot,Bumper1) ' Slings and Pop Bumpers

 	' Trough
	Set bsTrough = New cvpmBallStack
		bsTrough.Initsw 0,3,2,1,0,0,0,0
 		bsTrough.InitKick BallRelease,90,25
 		bsTrough.InitExitSnd SoundFX("ballrelease",DOFContactors), SoundFX("Solenoid",DOFContactors)
		bsTrough.Balls = 3
 		bsTrough.IsTrough = True

  	' Saucer (Lower Left)
	Set bsSaucerL = New cvpmBallStack
		bsSaucerL.InitSaucer SaucerL,5,78,22
 		bsSaucerL.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

     ' Saucer Magnet Left
    Set SLMagnet = New cvpmMagnet
        SLMagnet.InitMagnet SaucerLeftMagnet, 9
        SLMagnet.GrabCenter = 0
        SLMagnet.MagnetOn = 1
        SLMagnet.CreateEvents "SLMagnet"

  	' Saucer (Lower Right)
	Set bsSaucerR = New cvpmBallStack
		bsSaucerR.InitSaucer SaucerR,4,-90,22
 		bsSaucerR.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

     ' Saucer Magnet Right
    Set SRMagnet = New cvpmMagnet
        SRMagnet.InitMagnet SaucerRightMagnet, 9
        SRMagnet.GrabCenter = 0
        SRMagnet.MagnetOn = 1
        SRMagnet.CreateEvents "SRMagnet"

  	' Saucer (2nd Floor Bottom)
	Set bsSaucer1 = New cvpmBallStack
		bsSaucer1.InitSaucer Saucer1,17,178,1.20
 		bsSaucer1.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

  	' Saucer (2nd Floor Middle)
	Set bsSaucer2 = New cvpmBallStack
		bsSaucer2.InitSaucer Saucer2,18,180,20
 		bsSaucer2.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

  	' Saucer (2nd Floor Top)
	Set bsSaucer3 = New cvpmBallStack
		bsSaucer3.InitSaucer Saucer3,19,340,20
 		bsSaucer3.Initaltkick 160,10
 		bsSaucer3.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)

  	Set dtL=New cvpmDropTarget
		dtL.InitDrop Array(sw26,sw27,sw28),Array(26,27,28)
		dtL.InitSnd SoundFX("DTDrop",DOFContactors),SoundFX("DTReset",DOFContactors)

 	Set dtLL=New cvpmDropTarget
		dtLL.InitDrop Array(sw29,sw30,sw31),Array(29,30,31)
		dtLL.InitSnd SoundFX("DTDrop",DOFContactors),SoundFX("DTReset",DOFContactors)

 	Set dtU=New cvpmDropTarget
		dtU.InitDrop Array(sw46,sw47,sw48),Array(46,47,48)
		dtU.InitSnd SoundFX("DTDrop",DOFContactors),SoundFX("DTReset",DOFContactors)

 End Sub
 
'**********************************************************************************************************
'Plunger code
'**********************************************************************************************************

Sub Table1_KeyDown(ByVal KeyCode)
	If KeyDownHandler(keycode) Then Exit Sub
	If keycode = PlungerKey Then Plunger.Pullback:playsound"plungerpull"
End Sub

Sub Table1_KeyUp(ByVal KeyCode)
	If KeyUpHandler(keycode) Then Exit Sub
	If keycode = PlungerKey Then Plunger.Fire:PlaySound"plunger"
End Sub

'**********************************************************************************************************

 ' Drain and Kickers
Sub Drain_Hit:playsound"drain":bsTrough.addball me:End Sub
Sub Saucer1_Hit:bsSaucer1.addball me : playsound"popper_ball" : End Sub  
Sub Saucer2_Hit:bsSaucer2.addball me : playsound"popper_ball" : End Sub 
Sub Saucer3_Hit:bsSaucer3.addball me : playsound"popper_ball" : End Sub 
Sub SaucerL_Hit:bsSaucerL.addball me : playsound"popper_ball" : End Sub 
Sub SaucerR_Hit:bsSaucerR.addball me : playsound"popper_ball" : End Sub 

'Gate Trigger
Sub sw14_Hit()   	  : controller.switch (14)=1: End Sub 
Sub sw14_unHit() 	  : controller.switch (14)=0:End Sub

'Wire Triggers
Sub sw12_Hit()   	  : controller.switch (12)=1 : playsound"rollover" : End Sub  
Sub sw12_unHit() 	  : controller.switch (12)=0:End Sub
Sub sw13_Hit()		  : controller.switch (13)=1 : playsound"rollover" : End Sub 
Sub sw13_unHit()	  : controller.switch (13)=0:End Sub
Sub sw33_Hit()   	  : controller.switch (33)=1 : playsound"rollover" : End Sub
Sub sw33_unHit() 	  : controller.switch (33)=0:End Sub
Sub sw34_Hit()   	  : controller.switch (34)=1 : playsound"rollover" : End Sub 
Sub sw34_unHit() 	  : controller.switch (34)=0:End Sub
Sub sw35_Hit()   	  : controller.switch (35)=1 : playsound"rollover" : End Sub 
Sub sw35_unHit() 	  : controller.switch (35)=0:End Sub
Sub sw36_Hit()   	  : controller.switch (36)=1 : playsound"rollover" : End Sub 
Sub sw36_unHit() 	  : controller.switch (36)=0:End Sub

'Star Triggers
Sub sw37_Hit()   	  : controller.switch (37)=1 : playsound"rollover" : End Sub 
Sub sw37_unHit() 	  : controller.switch (37)=0:End Sub

'Bumpers
Sub Bumper1_Hit : vpmTimer.PulseSw(40) : playsound SoundFX("fx_bumper1",DOFContactors): End Sub

 'Stand Up Targets
 Sub sw21_Hit : vpmTimer.PulseSw(21) : End Sub 
 Sub sw22_Hit : vpmTimer.PulseSw(22): End Sub 
 Sub sw23_Hit : vpmTimer.PulseSw(23) : End Sub 
 Sub sw24_Hit : vpmTimer.PulseSw(24) : End Sub 

'Drop Targets
 Sub Sw26_Dropped:dtL.Hit 1 :End Sub  
 Sub Sw27_Dropped:dtL.Hit 2 :End Sub  
 Sub Sw28_Dropped:dtL.Hit 3 :End Sub

'Drop Targets
 Sub Sw29_Dropped:dtLL.Hit 1 :End Sub  
 Sub Sw30_Dropped:dtLL.Hit 2 :End Sub  
 Sub Sw31_Dropped:dtLL.Hit 3 :End Sub

'Drop Targets
 Sub Sw46_Dropped:dtU.Hit 1 :End Sub  
 Sub Sw47_Dropped:dtU.Hit 2 :End Sub  
 Sub Sw48_Dropped:dtU.Hit 3 :End Sub



set Lights(2) = L2
set Lights(3) = L3
set Lights(4) = L4
set Lights(6) = L6
set Lights(8) = L8
set Lights(9) = L9
set Lights(10) = L10
set Lights(12) = L12				' Pop Bumper Plastic

set Lights(14) = L14
set Lights(15) = L15
set Lights(18) = L18
set Lights(19) = L19
set Lights(20) = L20
set Lights(21) = L21
set Lights(22) = L22
set Lights(23) = L23
set Lights(24) = L24
set Lights(25) = L25
set Lights(26) = L26

set Lights(28) = L28

set Lights(30) = L30
set Lights(31) = L31
Lights(33)=array(L33,L33a,L33b,L33c,L33d,L33e)   'Lower PF GI???????????????
set Lights(34) = L34
set Lights(35) = L35
set Lights(36) = L36
set Lights(37) = L37
set Lights(38) = L38
set Lights(39) = L39
set Lights(40) = L40
set Lights(41) = L41
set Lights(42) = L42
set Lights(43) = L43
set Lights(44) = L44

set Lights(46) = L46
set Lights(47) = L47
Lights(49)=array(L49,L49a,L49b,L49c,L49d,L49e,L49f)   'UPPER PF GI???????????????
set Lights(50) = L50
set Lights(51) = L51
set Lights(52) = L52
set Lights(53) = L53
set Lights(54) = L54
set Lights(55) = L55
set Lights(56) = L56
set Lights(57) = L57
set Lights(58) = L58
set Lights(59) = L59
set Lights(60) = L60

set Lights(62) = L62

Lights(65) =  array(l65,l67a)
set Lights(66) = L66
Lights(67) = array(L67,l67a)
Lights(81) =  array(l81,l81a)
Set Lights(82) = L82
Set Lights(83) = L83				' Plunger Flasher
Lights(97) =  array(l97,l97a)
set Lights(98) = L98
set Lights(99) = L99
Lights(113) =  array(l113,l113a)
Lights(114) =  array(l114,l114a)
set Lights(115) = L115

'Backglass Lights
'set Lights(11) = L11					' Shoot Again
'set Lights(13) = L13					' Ball In Play
'set Lights(27) = L27					' Match
'set Lights(29) = L29					' High Score
'set Lights(45) = L45					' Game Over
'set Lights(61) = L61					' Tilt


'**********************************************************************************************************
'Digital Display
'**********************************************************************************************************

Dim Digits(40)
Digits(0)=Array(b00,b01,b02,b03,b04,b05,b06)
Digits(1)=Array(b10,b11,b12,b13,b14,b15,b16)
Digits(2)=Array(b20,b21,b22,b23,b24,b25,b26)
Digits(3)=Array(b30,b31,b32,b33,b34,b35,b36)
Digits(4)=Array(b40,b41,b42,b43,b44,b45,b46)
Digits(5)=Array(b50,b51,b52,b53,b54,b55,b56)
Digits(6)=Array(b60,b61,b62,b63,b64,b65,b66)
Digits(7)=Array(b70,b71,b72,b73,b74,b75,b76)
Digits(8)=Array(b80,b81,b82,b83,b84,b85,b86)
Digits(9)=Array(b90,b91,b92,b93,b94,b95,b96)
Digits(10)=Array(ba0,ba1,ba2,ba3,ba4,ba5,ba6)
Digits(11)=Array(bb0,bb1,bb2,bb3,bb4,bb5,bb6)
Digits(12)=Array(bc0,bc1,bc2,bc3,bc4,bc5,bc6)
Digits(13)=Array(bd0,bd1,bd2,bd3,bd4,bd5,bd6)
Digits(14)=Array(be0,be1,be2,be3,be4,be5,be6)
Digits(15)=Array(bf0,bf1,bf2,bf3,bf4,bf5,bf6)
Digits(16)=Array(bg0,bg1,bg2,bg3,bg4,bg5,bg6)
Digits(17)=Array(bh0,bh1,bh2,bh3,bh4,bh5,bh6)
Digits(18)=Array(bi0,bi1,bi2,bi3,bi4,bi5,bi6)
Digits(19)=Array(bj0,bj1,bj2,bj3,bj4,bj5,bj6)
Digits(20)=Array(bk0,bk1,bk2,bk3,bk4,bk5,bk6)
Digits(21)=Array(bl0,bl1,bl2,bl3,bl4,bl5,bl6)
Digits(22)=Array(bm0,bm1,bm2,bm3,bm4,bm5,bm6)
Digits(23)=Array(bn0,bn1,bn2,bn3,bn4,bn5,bn6)
Digits(24)=Array(bo0,bo1,bo2,bo3,bo4,bo5,bo6)
Digits(25)=Array(bp0,bp1,bp2,bp3,bp4,bp5,bp6)
Digits(26)=Array(bq0,bq1,bq2,bq3,bq4,bq5,bq6)
Digits(27)=Array(br0,br1,br2,br3,br4,br5,br6)
Digits(28)=Array(bs0,bs1,bs2,bs3,bs4,bs5,bs6)
Digits(29)=Array(bt0,bt1,bt2,bt3,bt4,bt5,bt6)
Digits(30)=Array(bu0,bu1,bu2,bu3,bu4,bu5,bu6)
Digits(31)=Array(bv0,bv1,bv2,bv3,bv4,bv5,bv6)
Digits(32)=Array(a00,a01,a02,a03,a04,a05,a06)
Digits(33)=Array(a10,a11,a12,a13,a14,a15,a16)
Digits(34)=Array(a20,a21,a22,a23,a24,a25,a26)
Digits(35)=Array(a30,a31,a32,a33,a34,a35,a36)
Digits(36)=Array(a40,a41,a42,a43,a44,a45,a46)
Digits(37)=Array(a50,a51,a52,a53,a54,a55,a56)

Sub DisplayTimer_Timer
	Dim ChgLED,ii,num,chg,stat,obj
	ChgLed = Controller.ChangedLEDs(&Hffffffff, &Hffffffff)
If Not IsEmpty(ChgLED) Then
		For ii = 0 To UBound(chgLED)
			num = chgLED(ii, 0) : chg = chgLED(ii, 1) : stat = chgLED(ii, 2)
			if (num < 38) then
				For Each obj In Digits(num)
					If chg And 1 Then obj.State = stat And 1 
					chg = chg\2 : stat = stat\2
				Next
			else
			end if
		next
end if
End Sub

'if Full Screen turn off Backglas Components but keep PF LED displays on
If DesktopMode = True Then
dim xxx
For each xxx in BG:xxx.Visible = 1: Next
else
For each xxx in BG:xxx.Visible = 0: Next
End if


'Bally Vector
'added by Inkochnito
Sub editDips
	Dim vpmDips : Set vpmDips = New cvpmDips
	With vpmDips
		.AddForm 700,400,"Vector - DIP switches"
		.AddChk 7,10,180,Array("Match feature", &H08000000)'dip 28
		.AddChk 205,10,115,Array("Credits display", &H04000000)'dip 27
		.AddFrame 2,30,190,"Maximum credits",&H03000000,Array("10 credits",0,"15 credits", &H01000000,"25 credits", &H02000000,"40 credits", &H03000000)'dip 25&26
		.AddFrame 2,106,190,"Making 3 upper left targets will",&H00000020,Array("reset 3 lower targets",0,"not reset 3 lower targets",&H00000020)'dip 6
		.AddFrame 2,152,190,"Multipiers lite will",&H00000040,Array("be off then alternate",0,"stay on till bonus lites are made",&H00000040)'dip 7
		.AddFrame 2,198,190,"X-Y-Z drop targets special",&H00000080,Array("25K - special - 25K",0,"25K - special keeps alternating",&H00000080)'dip 8
		.AddFrame 2,248,190,"Vectorscan to date readout",&H00002000,Array("can only be decreased manually",0,"after 8 games decrease by 20K",&H00002000)'dip 14
		.AddFrame 2,298,190,"With Vectorscan capture lite on",&H00004000,Array("3 lower targets will reset",0,"3 lower targets will go back down",&H00004000)'dip 15
		.AddFrame 2,348,190,"With Vectorscan capture lite off",32768,Array("targets down will reset",0,"any target down will go back down",32768)'dip 16
		.AddFrame 205,30,190,"Balls per game",&HC0000000,Array ("2 balls",&HC0000000,"3 balls",0,"4 balls",&H80000000,"5 balls",&H40000000)'dip 31&32
		.AddFrame 205,106,190,"Vectorscan bonus score readout",&H00100000,Array("readout will reset to 1",0,"readout will come back on",&H00100000)'dip 21
		.AddFrame 205,152,190,"Attract sound",&H00200000,Array("no voice",0,"voice says 'I am P.A.C. play analysis",&H00200000)'dip 22
		.AddFrame 205,198,190,"Vectorscan scoring adjust",&H00400000,Array("scores only when capture lite is on",0,"scores when capture lite is on or off",&H00400000)'dip 23
		.AddFrame 205,248,190,"Lite special and extra ball when",&H00800000,Array("hitting vector speed 800 or over",0,"hitting vector speed 750 or over",&H00800000)'dip 24
		.AddFrame 205,298,190,"Replay limit",&H10000000,Array("no limit",0,"1 replay per game",&H10000000)'dip 29
		.AddFrame 205,348,190,"H-Y-P-E target bonus adjust",&H20000000,Array("advances bonus only when lit",0,"advances bonus every time",&H20000000)'dip 30
		.AddLabel 50,400,350,20,"Set selftest position 16,17,18 and 19 to 03 for the best gameplay."
		.AddLabel 50,420,300,20,"After hitting OK, press F3 to reset game with new settings."
		.ViewDips
	End With
End Sub
Set vpmShowDips = GetRef("editDips")

' *********************************************************************
' *********************************************************************

					'Start of VPX call back Functions

' *********************************************************************
' *********************************************************************

'**********Sling Shot Animations
' Rstep and Lstep  are the variables that increment the animation
'****************
Dim RStep, Lstep

Sub RightSlingShot_Slingshot
	vpmtimer.pulsesw 38
    PlaySound SoundFX("right_slingshot",DOFContactors), 0, 1, 0.05, 0.05
    RSling.Visible = 0
    RSling1.Visible = 1
    sling1.TransZ = -20
    RStep = 0
    RightSlingShot.TimerEnabled = 1
End Sub

Sub RightSlingShot_Timer
    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

Sub LeftSlingShot_Slingshot
	vpmtimer.pulsesw 39
    PlaySound SoundFX("left_slingshot",DOFContactors),0,1,-0.05,0.05
    LSling.Visible = 0
    LSling1.Visible = 1
    sling2.TransZ = -20
    LStep = 0
    LeftSlingShot.TimerEnabled = 1
End Sub

Sub LeftSlingShot_Timer
    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
' *********************************************************************

Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
    Vol = Csng(BallVel(ball) ^2 / 2000)
End Function

Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
    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

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) ), 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
'**********************

Sub OnBallBallCollision(ball1, ball2, velocity)
	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
'************************************

' a timer called RollingTimer. With a fast interval, like 10
' 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
'******************************************

' sounds are played based on the ball speed and position

' the routine checks first for deleted balls and stops the rolling sound.

' The For loop goes through all the balls on the table and checks for the ball speed and 
' 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.

' The sound is played using the VOL, PAN and PITCH functions, so the volume and pitch of the sound
' 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
'**************************************

' The collision is built in VP.
' 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.


Sub Pins_Hit (idx)
	PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Targets_Hit (idx)
	PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Metals_Thin_Hit (idx)
	PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals_Medium_Hit (idx)
	PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals2_Hit (idx)
	PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Gates_Hit (idx)
	PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Spinner_Spin
	PlaySound "fx_spinner",0,.25,0,0.25
End Sub

Sub 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), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
	End if
	If finalspeed >= 6 AND finalspeed <= 20 then
 		RandomSoundRubber()
 	End If
End Sub

Sub 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), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
	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), 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

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), 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

Do you think this?



#54 Sindbad

Sindbad

    Pinball Freak

  • VIP
  • 364 posts
  • Location:Erbach, Germany

  • Flag: Germany

  • Favorite Pinball: Terminator



Posted 29 March 2017 - 08:51 PM

Sasa,

 

now the following line is missing:

 

SolCallback(10) = "bsSaucer3.SolOutAlt" ' Saucer (2nd Floor Top)    Release

 

Please add it to your script


Edited by Sindbad, 29 March 2017 - 08:52 PM.


#55 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 29 March 2017 - 09:21 PM

Sasa,

 

now the following line is missing:

 

SolCallback(10) = "bsSaucer3.SolOutAlt" ' Saucer (2nd Floor Top)    Release

 

Please add it to your script

 

line 9

change  

UseSolenoids=1  -->    UseSolenoids=0

 

 

line 36 remove the comment from solenoid 10

SolCallback(10) = "bsSaucer3.SolOutAlt"

 

 

hopefully this fixes the problem.

 

I understood that we should delete the 36 line

I'm going to try now, I am stupid



#56 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 29 March 2017 - 09:47 PM

Sindbad lived 100 years :otvclap:



#57 32assassin

32assassin

    Pinball Fan

  • VIP
  • 853 posts

  • Flag: United States of America

  • Favorite Pinball: terminator 2

Posted 31 March 2017 - 12:49 AM

I'm going to upload version 1.1 with the following fixes

 

- added primitive bulbs in the upper left corner (modified Lighting to light up bulbs)

- assuming everyone can agree the above changes fixed the problem.

- lights are now controlled with Jps VPX code

 

 

before I do that can anyone have any objections if I tie the push button switch to the Magna buttons?

'**********************************************************************************************************
'Plunger code
'**********************************************************************************************************

Sub Table1_KeyDown(ByVal KeyCode)
	If KeyDownHandler(keycode) Then Exit Sub
	If keycode = PlungerKey Then Plunger.Pullback:playsound"plungerpull"
 	If keycode = RightMagnaSave Then : controller.switch(8) = True ' VectorScan Reset Switch (Page Up Key)
End Sub

Sub Table1_KeyUp(ByVal KeyCode)
	If KeyUpHandler(keycode) Then Exit Sub
	If keycode = PlungerKey Then Plunger.Fire:PlaySound"plunger"
	If keycode = RightMagnaSave Then : controller.switch(8) = False ' VectorScan Reset Switch (Page Up Key)
End Sub

'**********************************************************************************************************


Edited by 32assassin, 31 March 2017 - 12:52 AM.

My Files
http://www.vpforums....4de64a621eccd40
My Table List
www.youtube.com/watch?v=DlaxLrXlPOU
See a table you like, help me complete it by finding the missing resources
https://www.dropbox....xTzKtGHTHa?dl=0





Also tagged with one or more of these keywords: Vector (Bally 1981), Vector