Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » Tables WIP




Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Wed Apr 15, 2020 3:35 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
wild wrote:
certainly, I remember it very well :lol:

ok,so say in 2 weeks.....but 16/30 april...or 1/15 may?

ok,but a question......what you added in this version? just to be precise.... :D


I keep updating it by the minute :lol:

1. Dynamic Flippers (added code for all 4 invisible flippers)
2.Ball Sounds
3.Zipper Flippers
4.Enabled the Juke Box songs 1-4 (Special 2 key to choose, otherwise it will just play through song list). The juke box was my idea but we chose to just enable the "Happy Days" theme song . But everyone seems to use music in games , so enabled the songs that I had planned that were in my "Bootleg" copy :D
5. increased table slope, increase bumper strength, added xml physics from IJ
6. Added code to hide flipper shadows
7. Deleted all the uneeded Shadow Toys and Flipper Toys
8. Changed "Bally Gater" to "L" key


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Wed Apr 15, 2020 5:42 pm 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1403
Location: Italy
Gimli wrote:
wild wrote:
certainly, I remember it very well :lol:

ok,so say in 2 weeks.....but 16/30 april...or 1/15 may?

ok,but a question......what you added in this version? just to be precise.... :D


I keep updating it by the minute :lol:

1. Dynamic Flippers (added code for all 4 invisible flippers)
2.Ball Sounds
3.Zipper Flippers
4.Enabled the Juke Box songs 1-4 (Special 2 key to choose, otherwise it will just play through song list). The juke box was my idea but we chose to just enable the "Happy Days" theme song . But everyone seems to use music in games , so enabled the songs that I had planned that were in my "Bootleg" copy :D
5. increased table slope, increase bumper strength, added xml physics from IJ
6. Added code to hide flipper shadows
7. Deleted all the uneeded Shadow Toys and Flipper Toys
8. Changed "Bally Gater" to "L" key


magnificent :shock: , when you have finished your work, let me know,ok?


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Wed Apr 15, 2020 11:04 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
wild wrote:
Gimli wrote:
wild wrote:
certainly, I remember it very well :lol:

ok,so say in 2 weeks.....but 16/30 april...or 1/15 may?

ok,but a question......what you added in this version? just to be precise.... :D


I keep updating it by the minute :lol:

1. Dynamic Flippers (added code for all 4 invisible flippers)
2.Ball Sounds
3.Zipper Flippers
4.Enabled the Juke Box songs 1-4 (Special 2 key to choose, otherwise it will just play through song list). The juke box was my idea but we chose to just enable the "Happy Days" theme song . But everyone seems to use music in games , so enabled the songs that I had planned that were in my "Bootleg" copy :D
5. increased table slope, increase bumper strength, added xml physics from IJ
6. Added code to hide flipper shadows
7. Deleted all the uneeded Shadow Toys and Flipper Toys
8. Changed "Bally Gater" to "L" key


magnificent :shock: , when you have finished your work, let me know,ok?


It's all yours now Paolo


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Thu Apr 16, 2020 8:01 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
Paolo, you now are in charge and have the official WIP table

but if you haven't done anything on it yet....
https://www.dropbox.com/s/5wjbzteya0bhs ... 6.fpt?dl=0

1. I added back the holes in table where zipper flippers slide
2.I adjusted the flipper toys as they were slightly imbedded into table
3.I turned off flippers when game is not in play and when Tilted


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Thu Apr 16, 2020 10:49 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1403
Location: Italy
Gimli wrote:
Paolo, you now are in charge and have the official WIP table

but if you haven't done anything on it yet....
https://www.dropbox.com/s/5wjbzteya0bhs ... 6.fpt?dl=0

1. I added back the holes in table where zipper flippers slide
2.I adjusted the flipper toys as they were slightly imbedded into table
3.I turned off flippers when game is not in play and when Tilted



Great bro, but if you think you can do anything else you can do it....
there is no hurry, for now, I am completing batman, then I dedicate myself to this
the biggest job was that of the fins, which you made very quickly, you are a phenomenon :D

i'm sure something else can escape, so consider everything you need, now take a look at this version


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Thu Apr 16, 2020 6:20 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
wild wrote:
Great bro, but if you think you can do anything else you can do it....
there is no hurry, for now, I am completing batman, then I dedicate myself to this
the biggest job was that of the fins, which you made very quickly, you are a phenomenon :D

i'm sure something else can escape, so consider everything you need, now take a look at this version


https://youtu.be/8BHgyLa7zZk

https://www.dropbox.com/s/5wjbzteya0bhs ... 6.fpt?dl=0

Here is an update:
1. Changed Flipper Models from Toys to Pegs using FP model editor...so now Flipper models aren't transparent
2. Added back the Flipper shadows that were showing through when they were transparent
3. Tweaked the way the Juke Box was playing and moved jukebox to backglass instead of
hud to be accessed with Special1 or Special 2 keys. So now should be usable for CAB and VR players too.
4. Lowered the crazy slingshot strength that made the balls always drain down outlanes.
5. Increased Tilt warnings so you can try and Nudge out of outlane issue in 4.
6. "L" remains the Bally Gater and "B" and "M" are cheat codes to turn on/off zipper flippers
7. :oops: Oops I had the Flipper textures backwards...fixed

https://youtu.be/k7iki5UjF_w


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Fri Apr 17, 2020 10:07 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1403
Location: Italy
eh..ehe..ee :shock:

very well, you keep improving the table, I'm very happy about it.an excellent version will come out

a question, Bob, since I don't know the rules, the zipper pinball, when it activates? or rather in what situation do they close?

How is the Juke Box activated?Special 2 what key it is?


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Fri Apr 17, 2020 11:02 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
wild wrote:
eh..ehe..ee :shock:

very well, you keep improving the table, I'm very happy about it.an excellent version will come out

a question, Bob, since I don't know the rules, the zipper pinball, when it activates? or rather in what situation do they close?

How is the Juke Box activated?Special 2 what key it is?

Special 1 and special 2 key are set under future pinball key settings

Zipper flipper is turned on by centre trigger just above flippers and zipper is turned off by hitting the little white button that is on the playfield to the right of the centre trigger.


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Fri Apr 17, 2020 11:37 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1403
Location: Italy
Gimli wrote:
wild wrote:
eh..ehe..ee :shock:

very well, you keep improving the table, I'm very happy about it.an excellent version will come out

a question, Bob, since I don't know the rules, the zipper pinball, when it activates? or rather in what situation do they close?

How is the Juke Box activated?Special 2 what key it is?

Special 1 and special 2 key are set under future pinball key settings

Zipper flipper is turned on by centre trigger just above flippers and zipper is turned off by hitting the little white button that is on the playfield to the right of the centre trigger.


nice,I understand :D

Is it possible for you to operate the Ballygator with fins?is easier than pressing a button, what do you think?

let's say, with the two fins activated and pressed....



question, what is all this code?

Code:
   'SOUND MODE

   set foundFastBallResultPF=foundFastBallPlayfield()
   set foundFastBallResultRamp=foundFastBallRamp()
   tmpballonwire=stillBallOnWire()


   volRampFactor=1.0
   invvolRampFactor=0.0
   

   if (foundFastBallResultPF is nothing) then
      if not(ZRBlastfoundFastBallResultPF is nothing) then
         ZRBchanPFPaused=true
         set ZRBlastfoundFastBallResultPF=nothing
         EffectMusic ZRBsoundballchan, Pause, 0, 0
      end if
    else
      set ZRBlastfoundFastBallResultPF = foundFastBallResultPF
    ' play the rolling sound for each ball
        If ((zfunBallVel(foundFastBallResultPF)>1)) Then

            volRampFactor=1.0/((relativeBallHeight(foundFastBallResultPF.PositionGlobal.z)/7) ^2 +1)

            if (ZRBchanPFPaused) then
               ZRBchanPFPaused=false
               EffectMusic ZRBsoundballchan, ResumePlaying, 0, 0
            end if
            EffectMusic ZRBsoundballchan, SetVolume, zfunVol(foundFastBallResultPF)*volRampFactor*ZRBvolNormLevel, 0
            EffectMusic ZRBsoundballchan, SetFrequency, 0, zfunPitch(foundFastBallResultPF)+ZRBPitchTunning

'AddDebugText ( relativeBallHeight(foundFastBallResultPF.PositionGlobal.z)  ) & "   " & volRampFactor &" P"&time()

'if (round(100*(zfunVol(foundFastBallResultPF)*volRampFactor))>10) then
'AddDebugText "v "&round(100*(zfunVol(foundFastBallResultPF)*volRampFactor)) & " P "&(zfunPitch(foundFastBallResultPF)+ZRBPitchTunning)
'end if
        Else
            if not(ZRBchanPFPaused) then
               ZRBchanPFPaused=true
               EffectMusic ZRBsoundballchan, Pause, 0, 0
            end if
        End If
    end if


         
      if (ZRBrampSoundballchan>0) then         
            if (foundFastBallResultRamp is nothing) then
               if not(ZRBlastfoundFastBallResultRamp is nothing) then
                  set ZRBlastfoundFastBallResultRamp=nothing
                  ZRBchanRampPaused=true
                  EffectMusic ZRBrampSoundballchan, Pause, 0, 0
               end if
         
            else
               set ZRBlastfoundFastBallResultRamp = foundFastBallResultRamp
             ' play the rolling sound for each ball
                 If ((zfunBallVel(foundFastBallResultRamp)>1)) Then
                  
                              volRampFactor=1.0-1.0/((relativeBallHeight(foundFastBallResultRamp.PositionGlobal.z)/7) ^2 +1)
                              if (volRampFactor<0.0) then
                                 volRampFactor=0.0
                              end if
                  
                           
                              if (tmpballonwire) then
                                 if (ZRBlastRampSound=ZRBrampRollingSound) then
                                    ZRBlastRampSound=ZRBwireRollingSound
                                    StopMusic ZRBrampSoundballchan         
                                    PlayMusic ZRBrampSoundballchan, ZRBwireRollingSound, TRUE ,0 ,0
                                 else                  
                                       if (ZRBchanRampPaused) then
                                          ZRBchanRampPaused=false
                                          EffectMusic ZRBrampSoundballchan, ResumePlaying, 0, 0
                                       end if
                                 end if
                                 EffectMusic ZRBrampSoundballchan, SetVolume, zfunVol(foundFastBallResultRamp)*volRampFactor*ZRBwireVolNormLevel, 0
                                 EffectMusic ZRBrampSoundballchan, SetFrequency, 0, zfunPitch(foundFastBallResultRamp)+ZRBwirePitchTunning
'AddDebugText "ww->"&zfunVol(foundFastBallResultRamp)*volRampFactor*ZRBwireVolNormLevel
                              else
                                 if not(ZRBlastRampSound=ZRBrampRollingSound) then
                                    ZRBlastRampSound=ZRBrampRollingSound
                                    StopMusic ZRBrampSoundballchan         
                                    PlayMusic ZRBrampSoundballchan, ZRBrampRollingSound, TRUE ,0 ,0
                                 else                  
                                       if (ZRBchanRampPaused) then
                                          ZRBchanRampPaused=false
                                          EffectMusic ZRBrampSoundballchan, ResumePlaying, 0, 0
                                       end if
                                 end if
                                 EffectMusic ZRBrampSoundballchan, SetVolume, zfunVol(foundFastBallResultRamp)*volRampFactor*ZRBrampVolNormLevel, 0
                                 EffectMusic ZRBrampSoundballchan, SetFrequency, 0, zfunPitch(foundFastBallResultRamp)+ZRBrampPitchTunning
                              end if
'         AddDebugText relativeBallHeight(foundFastBallResultRamp.PositionGlobal.z) & "   " & volRampFactor &" R"&time()
         
         'if (round(100*(zfunVol(foundFastBallResultRamp)*volRampFactor))>10) then
         'AddDebugText "v2 "&round(100*(zfunVol(foundFastBallResultRamp)*volRampFactor)) & "P2  "&(zfunPitch(foundFastBallResultRamp)+ZRBPitchTunning)
         'end if
                 Else
                        if not(ZRBchanRampPaused) then
                           ZRBchanRampPaused=true
                           EffectMusic ZRBrampSoundballchan, Pause, 0, 0
                        end if
                 End If
            end if
      end if   


End Sub

Function relativeBallHeight(zzz)
   if (zzz<ZRBrampHeight) then
      relativeBallHeight=0.0
   else
      relativeBallHeight=(zzz-ZRBrampHeight)
   end if

end Function

Function zfunVol(ball) ' Calculates the Volume of the sound based on the ball speed
   'zfunVol = (zfunBallVel(ball) + zfunBallVel(ball) ^2) / ZRBvolTuning
   zfunVol = (zfunBallVel(ball) ^2) / ZRBvolTuning
   if (zfunVol>1.0) then
      zfunVol=1.0
   end if
End Function

Function foundFastBallPlayfield() ' Calculates the Volume of the sound based on the ball speed
   dim speed,speedtmp,tmpball,j
   speed=1
   set foundFastBallPlayfield=nothing
   For j = 1 To 20
      set tmpball=ZRBtrakedSoundBalls(j)
      if (not(tmpball is nothing)) then
         speedtmp=zfunBallVel(tmpball)
         if (speedtmp>speed and (tmpball.PositionGlobal.z<ZRBrampHeight)) then
            set foundFastBallPlayfield=tmpball
            speed=speedtmp
'AddDebugText j& "fast "& speed
         end if
      end if
   Next
End Function

Function foundFastBallRamp() ' Calculates the Volume of the sound based on the ball speed
   dim speed,speedtmp,tmpball,j
   speed=1
   set foundFastBallRamp=nothing
   For j = 1 To 20
      set tmpball= ZRBtrakedSoundBalls(j)
      if (not(tmpball is nothing)) then
         speedtmp=zfunBallVel(tmpball)
         if (speedtmp>speed and (tmpball.PositionGlobal.z>=ZRBrampHeight)) then
            set foundFastBallRamp=tmpball
            speed=speedtmp
'AddDebugText j& "fastramp "& speed
         end if
      end if
   Next
End Function

'add a call to this in FuturePinball_BeginPlay
Sub initTrakedSoundBalls()
   dim j
   RollingBallUpdateTimer.userdata = nothing

   For j = 1 To 20
      set ZRBtrakedSoundBalls(j)=nothing
      set ZRBwireSoundBalls(j)=nothing      
   Next

   'limited to 1 ball sound sorry
   StopMusic ZRBsoundballchan         
   PlayMusic ZRBsoundballchan, ZRBrollingSound, TRUE ,0 ,0
   EffectMusic ZRBsoundballchan, Pause, 0, 0

   if (ZRBrampSoundballchan>0) then
      StopMusic ZRBrampSoundballchan         
      PlayMusic ZRBrampSoundballchan, ZRBrampRollingSound, TRUE ,0 ,0
      EffectMusic ZRBrampSoundballchan, Pause, 0, 0
   end if


   set ZRBlastfoundFastBallResultPF= nothing
   set ZRBlastfoundFastBallResultRamp= nothing
   ZRBchanRampPaused=true
   ZRBchanPFPaused=true
   
   zmaxspeedworldrecord=0.0
   
   ZRBlastRampSound=ZRBrampRollingSound
   
AddDebugText "ZRBrampHeight "&ZRBrampHeight
AddDebugText "ZRBtablewide "&   ZRBtablewide
AddDebugText "ZRBsoundballchan "&   ZRBsoundballchan
AddDebugText "ZRBvolNormLevel "&    ZRBvolNormLevel
AddDebugText "ZRBrollingSound "&   ZRBrollingSound
AddDebugText "ZRBPitchTunning "&     ZRBPitchTunning
AddDebugText "ZRBrampSoundballchan "&    ZRBrampSoundballchan
AddDebugText "ZRBrampVolNormLevel "&       ZRBrampVolNormLevel
AddDebugText "ZRBrampRollingSound "&      ZRBrampRollingSound
AddDebugText "ZRBrampPitchTunning "&       ZRBrampPitchTunning
AddDebugText "ZRBwireVolNormLevel "&    ZRBwireVolNormLevel
AddDebugText "ZRBwireRollingSound "&       ZRBwireRollingSound
AddDebugText "ZRBwirePitchTunning "&      ZRBwirePitchTunning


   RollingBallUpdateTimer.set true,50
end sub


'called when creating a ball (PlungerKicker ?)
'zbrcreator=trigger/kicker
'zbrtriggheight=height of the trigger (default to 0)
Sub addTrackedBall(zbrcreator)
   addTrackedBallHeight zbrcreator,0.0
end sub
Sub addTrackedBallHeight(zbrcreator,zbrcreatorheight)
   dim j , tmpfoundindex ,tmpball

   RollingBallUpdateTimer.set false

   set tmpball = xBAM_BallCloseTo(zbrcreator.x, zbrcreator.y,zbrcreatorheight)
'AddDebugText zbrcreator.x&"  "&zbrcreator.y
   if (tmpball is nothing) then
AddDebugText "BUUGGGGGGGGG xBAM_BallCloseTo"
 end if
 tmpfoundindex=-1

   For j = 1 To 20
      if (ZRBtrakedSoundBalls(j) is nothing) then         
         if (tmpfoundindex=-1) then
            tmpfoundindex = j
         end if
      else
            if ( ((tmpball.PositionGlobal.x-ZRBtrakedSoundBalls(j).PositionGlobal.x)^2+(tmpball.PositionGlobal.y-ZRBtrakedSoundBalls(j).PositionGlobal.y)^2+(tmpball.PositionGlobal.z-ZRBtrakedSoundBalls(j).PositionGlobal.z)^2)<ZRBsearchshifterror ) then
               tmpfoundindex=-2
AddDebugText "cleanedc->"&j&" "& ((tmpball.PositionGlobal.x-ZRBtrakedSoundBalls(j).PositionGlobal.x)^2+(tmpball.PositionGlobal.y-ZRBtrakedSoundBalls(j).PositionGlobal.y)^2+(tmpball.PositionGlobal.z-ZRBtrakedSoundBalls(j).PositionGlobal.z)^2)            
            end if
      end if
   Next

         if (tmpfoundindex>-1) then
            set ZRBtrakedSoundBalls(tmpfoundindex) =   tmpball
AddDebugText "addc->"&tmpfoundindex&" "& ((tmpball.PositionGlobal.x-ZRBtrakedSoundBalls(tmpfoundindex).PositionGlobal.x)^2+(tmpball.PositionGlobal.y-ZRBtrakedSoundBalls(tmpfoundindex).PositionGlobal.y)^2+(tmpball.PositionGlobal.z-ZRBtrakedSoundBalls(tmpfoundindex).PositionGlobal.z)^2)      
         end if
   
   RollingBallUpdateTimer.set true,50
end Sub

'called when creating a ball is on metal ramp
'zbrtrigg=trigger
'zbrtriggheight=height of the trigger (default to 0)
Sub addWireRampTrackedBall(zbrtrigg)
   addWireRampTrackedBallHeight zbrtrigg,0.0
end sub
Sub addWireRampTrackedBallHeight(zbrtrigg,zbrtriggheight)
   dim j  , tmpfoundindex ,tmpball

   RollingBallUpdateTimer.set false


   set tmpball = xBAM_BallCloseTo(zbrtrigg.x, zbrtrigg.y,zbrtriggheight)
'AddDebugText zbrtrigg.x&"  "&zbrtrigg.y
   if (tmpball is nothing) then
AddDebugText "BUUGGGGGGGGG xBAM_BallCloseTo"
 end if
 tmpfoundindex=-1

   For j = 1 To 20
      if (ZRBwireSoundBalls(j) is nothing) then         
         if (tmpfoundindex=-1) then
            tmpfoundindex = j
         end if
      else
            if ( ((tmpball.PositionGlobal.x-ZRBwireSoundBalls(j).PositionGlobal.x)^2+(tmpball.PositionGlobal.y-ZRBwireSoundBalls(j).PositionGlobal.y)^2+(tmpball.PositionGlobal.z-ZRBwireSoundBalls(j).PositionGlobal.z)^2)<ZRBsearchshifterror ) then
               tmpfoundindex=-2
            AddDebugText "cleanedw->"&j&" "& ((tmpball.PositionGlobal.x-ZRBwireSoundBalls(j).PositionGlobal.x)^2+(tmpball.PositionGlobal.y-ZRBwireSoundBalls(j).PositionGlobal.y)^2+(tmpball.PositionGlobal.z-ZRBwireSoundBalls(j).PositionGlobal.z)^2)      
            end if
      end if
   Next

         if (tmpfoundindex>-1) then
            set ZRBwireSoundBalls(tmpfoundindex) =   tmpball
            AddDebugText "addw->"&tmpfoundindex&" "& ((tmpball.PositionGlobal.x-ZRBwireSoundBalls(tmpfoundindex).PositionGlobal.x)^2+(tmpball.PositionGlobal.y-ZRBwireSoundBalls(tmpfoundindex).PositionGlobal.y)^2+(tmpball.PositionGlobal.z-ZRBwireSoundBalls(tmpfoundindex).PositionGlobal.z)^2)      
         end if
   
   RollingBallUpdateTimer.set true,50
end Sub



'to force a remove for wire sound in some case
'zbrtrigg=trigger
'zbrtriggheight=height of the trigger (default to 0)
Sub removeWireRampTrackedBall(zbrtrigg)
   removeWireRampTrackedBallHeight zbrtrigg,0.0
end sub
Sub removeWireRampTrackedBallHeight(zbrtrigg,zbrtriggheight)
   dim j,tmpball

'AddDebugText "remove wire " &zbrtrigg.x&"  "&zbrtrigg.y

   RollingBallUpdateTimer.set false

      For j = 1 To 20
         if not(ZRBwireSoundBalls(j) is nothing) then
            set tmpball=ZRBwireSoundBalls(j)
            if ( ((tmpball.PositionGlobal.x-zbrtrigg.x)^2+(tmpball.PositionGlobal.y-zbrtrigg.y)^2+(tmpball.PositionGlobal.z-zbrtriggheight)^2)<ZRBsearchshifterror ) then
               set ZRBwireSoundBalls(j)=nothing
AddDebugText "delw "&j&"  "&(((tmpball.PositionGlobal.x-zbrtrigg.x)^2+(tmpball.PositionGlobal.y-zbrtrigg.y)^2+(tmpball.PositionGlobal.z-zbrtriggheight)^2))
            else
AddDebugText "whattttttt"  &tmpball.PositionGlobal.x&"  "&tmpball.PositionGlobal.y&"  "&tmpball.PositionGlobal.z&"-->"&(((tmpball.PositionGlobal.x-zbrtrigg.x)^2+(tmpball.PositionGlobal.y-zbrtrigg.y)^2+(tmpball.PositionGlobal.z-zbrtriggheight)^2))
            end if
         end if
      Next



   RollingBallUpdateTimer.set true,50

end sub



'called by drain_hit
'zbrdestroyer=trigger/kicker
'zbrdestroyerheight=height of the trigger (default to 0)
Sub deleteTrackedBall(zbrdestroyer)
   deleteTrackedBallHeight zbrdestroyer,0.0
end sub
Sub deleteTrackedBallHeight(zbrdestroyer,zbrdestroyerheight)
   dim j,tmpball

   RollingBallUpdateTimer.set false

      For j = 1 To 20
         if not(ZRBtrakedSoundBalls(j) is nothing) then
            set tmpball=ZRBtrakedSoundBalls(j)
            if ( ((tmpball.PositionGlobal.x-zbrdestroyer.x)^2+(tmpball.PositionGlobal.y-zbrdestroyer.y)^2+(tmpball.PositionGlobal.z-zbrdestroyerheight)^2)<ZRBsearchshifterror ) then
               set ZRBtrakedSoundBalls(j)=nothing
AddDebugText "del "&j&"  "&(((tmpball.PositionGlobal.x-zbrdestroyer.x)^2+(tmpball.PositionGlobal.y-zbrdestroyer.y)^2+(tmpball.PositionGlobal.z-zbrdestroyerheight)^2))

            end if
         end if
      Next



   RollingBallUpdateTimer.set true,50

end sub


function stillBallOnWire()
   dim j,tmpball

  stillBallOnWire=false
 
      For j = 1 To 20
      if not(ZRBwireSoundBalls(j) is nothing) then
         set tmpball=ZRBwireSoundBalls(j)
         
         if (tmpball.PositionGlobal.z>=ZRBrampHeight) then
'AddDebugText "wire "&j&" "&tmpball.PositionGlobal.z
            stillBallOnWire=true
         else
'AddDebugText "nowire "&j&" "&tmpball.PositionGlobal.z
            set ZRBwireSoundBalls(j)=nothing      
         end if
      end if
   Next
end Function


Function zfunPan(ball) ' Calculates the pan for a ball based on the X position on the table.
    Dim tmp
    tmp = ball.PositionGlobal.x * 2 / ZRBtablewide-1
    If tmp > 0 Then
        zfunPan = (tmp ^10)
    Else
        zfunPan = (-((- tmp) ^10))
    End If
End Function

Function zfunPitch(ball) ' Calculates the pitch of the sound based on the ball speed
    zfunPitch = round(100+zfunBallVel(ball)/4)
   if (zfunPitch>120) then
      zfunPitch=120
   end if
End Function


Function zfunBallVel(ball) 'Calculates the ball speed
    'yes we don't use the Z that we want
      zfunBallVel = INT(  SQR(  (ball.velocity.x^2 + ball.velocity.y^2)   )/ZRBvelTuning )
    if (zfunBallVel>zmaxspeedworldrecord)   then
       zmaxspeedworldrecord    =    zfunBallVel
         AddDebugText "speedworldrecord "& zmaxspeedworldrecord
      end if
End Function
' =====================================================================================
' =====================================================================================
' =====================================================================================


Top 
 Profile  
 
 Post subject: Re: Nip it update for Franzleo
 Post Posted: Fri Apr 17, 2020 1:43 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
yes sure Bally Gater can be coded that way

The Sound Code is Smokes Ball Rolling Code...I just copy and pasted it
For Ball sounds you need:
1. This code
2. import the various sound files under "music manager"
3. Add the Ball rolling timer

This way you don't require the VBS script files or any external files...

This New code of Rav's will allow Hockey and Foose ball tables now....
I will try some proof of concepts...very interesting :shock:


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

Board index » Future Pinball » Tables WIP


Who is online

Users browsing this forum: No registered users and 7 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: