Jump to content

REVISED: Script GURU needed...


watacaractr

Recommended Posts

  • Content Provider

Hey everyone, I had a few people ask for a bit more information on what exactly I needed for the script on my Hollywood Heat mod. Hopefully someone out there looks at this and realizes it’s an easy addition to the script, so here goes. I’m using Borgdog’s HH and setting the rom sounds to off in the script and using my own background music, which is located in the music folder. Basically, all I need to do is play music and/or sound effects when the balls are released for the multiball bonus, then ends when it’s over. Basic sequence: 1. Balls release. 2. background music volume decreases. 3. multiball bonus music/sounds play until the 2 released balls have drained and you’re back to one (or none if you lose all at once). 4. multiball bonus music/sounds ends or fades out. 5. background music returns to normal volume. The trick is that when you still have locked or captive balls on the field, then the bonus music doesn’t activate when the balls are automatically released when the game is over. Can this be done? Please help if you can or at least point me in the right direction. I am far from a scripter, so any help would surely be appreciated. Thank you all in advance. Cheers!

Link to comment
Share on other sites

  • Content Provider

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...