Scripting guru needed…

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #88920
    Watacaractr
    Participant
      @watacaractr

      Hey everyone. I’m working on a mod of Hollywood Heat and I want to add script that basically hasn’t been tried before with this particular table. I was almost done then I hit a wall trying to figure it out. :scratch:  It’s basically a multiball tweak. I’m sure one of the many great scripters out there could easily do it, so if anyone could help or at least lead me in the right direction, I would really appreciate it. PM me for the details. Thank you all in advance.

      #88934
      TerryRed
      Moderator
        @terryred
        MemberContributorModerator

        More info needed….

        …but seeing that this is a rom based table, you can’t actually change any of the multi-ball code itself….correct?

        #88936
        Thalamus
        Moderator
          @thalamus
          ContributorMemberModerator

          It sounds like a problem yes. But, what do I know.

          I guess it can be done. Maybe it is possible to make sure that once those extra balls drain, they don’t actually drain but gets destroyed until there is only one ball left ?!

          #88952
          TerryRed
          Moderator
            @terryred
            MemberContributorModerator

            With rom based tables…the best you can probably do is keep track of how many balls are on the playfield and try your best to keep trak of drained vs “ball saved”, etc. I went through this nightmare with Tron, and since it could have multiple MB modes and other Timed modes all happening at the same time…it was very tricky to get PuP videos working properly for all those modes.

             

            Here is some of the code I used for that for keeping track of balls when they drained, etc…   maybe it can help….

             

            Sub PUP_MB_End_Check_Timer() ‘Wait a few secs and then check to see if only 1 ball left to disable MB Active modes
            If HasPuP Then
            If BallCount = 1 and (PUP_QuorraMB_Active=True OR PUP_LightCycleMB_Active=True OR PUP_DiscWarsMB_Active=True) Then
            PuPlayer.SetLoop 0,0
            PuPlayer.SetLoop 2,0
            PUP_QuorraMB_Active=False
            PUP_LightCycleMB_Active=False
            PUP_DiscWarsMB_Active=False
            PuPlayer.playlistplayex 0,”MultiballEnd”,””,100,20
            End If
            End If
            PUP_MB_End_Check.enabled=False
            End Sub

            Sub PUP_Drain ‘Check for Shoot Again Light, Balls Left is 0 = Drained, Are MB Modes Active?
            if HasPuP Then
            PUP_Drain_Check.enabled=True
            End if
            End Sub

            Sub PUP_Drain_Check_Timer()
            if HasPuP Then
            if PUP_ShootAgain <=0 and BallCount <= 0 then
            PuPlayer.SetLoop 0,0
            PuPlayer.SetLoop 2,0
            PUP_QuorraMB_Active=False
            PUP_LightCycleMB_Active=False
            PUP_DiscWarsMB_Active=False
            PUP_Zuse_Check.enabled = False
            PUP_Gem_Check.enabled=false
            PuPlayer.playlistplayex 2,”Drain”,””,100,20
            PuPlayer.playlistplayex 0,”EndofLine”,””,100,20
            End if
            if PUP_ShootAgain >=40 and BallCount = 0 and PUP_QuorraMB_Active=False and PUP_LightCycleMB_Active=False and PUP_DiscWarsMB_Active=False then
            PuPlayer.playlistplayex 0,”ShootAgain”,””,100,0
            End if
            if (PUP_QuorraMB_Active=True OR PUP_LightCycleMB_Active=True OR PUP_DiscWarsMB_Active=True) and BallCount = 1 then
            PUP_MB_End_Check.enabled=True ‘Wait a few secs and then check to see if only 1 ball left to disable MB Active modes
            End If
            End If
            PUP_Drain_Check.enabled=False
            End Sub

            #88955
            gtxjoe
            Participant
              @gtxjoe
              Member

              You can use getballs() to find out how many balls on the playfield. Something like

              sub drain_hit

              dim tmp, ballcount

              tmp = GetBalls

              ballcount = Ubound(tmp) + 1

              if ballcount > xxx then

              else

              1 user thanked author for this post.
              #89188
              xenonph
              Participant
                @xenonph
                MemberContributor

                I am definately not a script guru, but I like helping people, so here goes….

                Not sure about the fading out of a sound, because nobody ever told me about it, but you can switch sounds for multi ball with method below.

                If someone does know this fade music out command, I certainly would be interested in it!!

                 

                This method may be the wrong way of doing it, but this is how I learned, and it works for me.

                 

                So first you want to Dim a few variables.

                You can add these dim commands towards top of script next to the other ones.

                Dim AA, BB, CC, DD, EE, FF

                For the kicker subs, you need to make UnHit subs as seen below.

                Starting at Line 258

                ‘ Ball locks / kickers

                Sub sw46_Hit:PlaySound “holein”:bslLock.AddBall 0
                AA=1:FF=1
                If AA=1 and BB=1 then CC=1
                End Sub

                Sub sw46_UnHit
                AA=0
                End Sub

                Sub sw56_Hit:PlaySound “holein”:bsrLock.AddBall 0
                BB=1:FF=1
                If AA=1 and BB=1 then CC=1
                End Sub

                Sub sw56_UnHit
                BB=0
                If CC=1 And FF=1 then EndMusic:PlayMusic”MULTIBALLMUSIC.mp3″:CC=0:DD=1:EE=0
                End Sub

                Basically this is what script is doing.

                Lock a ball in left kicker and AA=1

                Lock a ball in right kicker and BB=1

                When the 2 balls are locked at same time CC=1

                Since the right kicker is the first ball released during multi ball I added the multiball variable to the UnHit Sub of that kicker.

                I added the FF=1 so if a ball is drained, FF will be FF=0 which means if you have 2 balls locked, and drain one for game over, it wont start the Multiball music.

                Now to shut off this multiball music after 2 balls drain.

                Starting at Line 328

                ‘******************************************************
                ‘ DRAIN & RELEASE
                ‘******************************************************

                Sub sw66_Hit()
                PlaySoundat “drain”, sw66
                UpdateTrough
                Controller.Switch(66) = 1
                FF=0
                If DD=1 Then EE=EE+1
                If EE=2 Then EndMusic:PlayMusic”REGULARMUSIC.mp3″:DD=0:EE=0
                End Sub

                So once multiball is started it makes DD=1

                So when ball drains EE=EE+1 which just means its counting drains now.

                After 2 drains during multiball or EE=2, the multiball music stops, and the regular music is called.

                I havent actually tried this out yet, so there may be syntax or missing an “End If” on the drain ifs.

                This should help you get your multiball music working.

                Carry on.

                #89216
                Watacaractr
                Participant
                  @watacaractr

                  Wow! Thank you xenonph! I will try these codes today and let you know. By the way, thanks again for the positive feedback for my Iron Maiden table over at the other FP site. Cheers!

                  1 user thanked author for this post.
                  #89296
                  xenonph
                  Participant
                    @xenonph
                    MemberContributor

                    The “MULTIBALLMUSIC.mp3” and “REGULARMUSIC.mp3” are just an example name. You would switch these names with the actual names of your mp3 files in your music folder that you are wanting to use for those specific sounds.

                     

                    After seeing the script BorgDog did for you,

                    You can change the drain script …

                    Change from…
                    If EE=2 Then EndMusic:PlayMusic”REGULARMUSIC.mp3”:DD=0:EE=0
                    To
                    If EE=2 Then EndMusic:PlaySong:DD=0:EE=0

                     

                    This will toggle his playsong script. If you dont have a specific song you want for multiball, and just want it to change to next song, then change this part of script…

                     

                    Change from…

                    Sub sw56_UnHit
                    BB=0
                    If CC=1 And FF=1 then EndMusic:PlayMusic”MULTIBALLMUSIC.mp3″:CC=0:DD=1:EE=0
                    End Sub

                     

                    To…

                    Sub sw56_UnHit
                    BB=0
                    If CC=1 And FF=1 then EndMusic:PlaySong:CC=0:DD=1:EE=0
                    End Sub

                    And yes I love that Iron Maiden table!!

                    I actually had an idea for an original Iron Maiden table and it was going to be called Powerslave.

                    I was going to have egyptian theme with pyramids and the works. Just never got around to it.

                  Viewing 8 posts - 1 through 8 (of 8 total)

                  Forums are currently locked.

                  ©2024 VPinBall.com

                  Log in with your credentials

                  Forgot your details?