Jump to content



Photo
- - - - -

Add Rom event to VPX script as a trigger

VPX

  • Please log in to reply
4 replies to this topic

#1 BigOnYa

BigOnYa

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: United States of America

  • Favorite Pinball: Cyclone

Posted Yesterday, 03:00 PM

Ok so I'm making a pup pack for myself and can't find any way to trigger multiball pupevent in the script on this table. The Rom only triggers a certain song during multiball, then goes back to normal music when multiball is over, but the song is not in script or sound manager. Using Vpinmame/ altsound, it shows me which sound file is triggered from the Rom, and the HEX ID of the file used during multiball.
So my question is, is there a way to use that HEX ID in VPX script? Like example:
If 0x00003 (=1/On/or whatever) Then pupevent 03
Also I've already looked at DOF Config Tool for this table, and no luck.

Edited by BigOnYa, Yesterday, 03:26 PM.


#2 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,654 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted Yesterday, 07:12 PM

It's been a while now, and I don't remember exactly how I did it.

 

I searched for the sound IDs using PinMAME32,

then, thanks to some code written by Destruk,

I used the sounds to move the alligator's mouth from the Surf 'n Safari table.

Look for "Sound Subs from Destruk's table", which should be at the end of the scripts.



#3 BigOnYa

BigOnYa

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: United States of America

  • Favorite Pinball: Cyclone

Posted Today, 03:34 AM

It's been a while now, and I don't remember exactly how I did it.

 

I searched for the sound IDs using PinMAME32,

then, thanks to some code written by Destruk,

I used the sounds to move the alligator's mouth from the Surf 'n Safari table.

Look for "Sound Subs from Destruk's table", which should be at the end of the scripts.

I tried copying that script from that table: 

"Sub TrackSounds
    Dim NewSounds, ii, Snd
    NewSounds = Controller.NewSoundCommands
    If Not IsEmpty(NewSounds) Then
        For ii = 0 To UBound(NewSounds)
            Snd = NewSounds(ii, 0)
            If Snd = 6 Then JawAnim:AnimStep=19"......etc

using the HEX sound numbers, in to this tables script but it does not cue anything in my script from the Rom sounds played.

Oh well, not a big deal, was just curious if was possible. Thanks for responding though and trying to help.
 


Edited by BigOnYa, Today, 04:05 AM.


#4 bigus1

bigus1

    Pinball Fan

  • Members
  • PipPipPipPip
  • 968 posts
  • Location:Brisbane, Australia

  • Flag: Australia

  • Favorite Pinball: Firepower

Posted Today, 04:36 AM

A Multiball insert light would be easy to tap for a trigger. Lights are the most common way to trigger extra table events linked to the ROM

You could also poll the trough -  If bstrough.balls <2 then .... ( for 3 ball trough)    and add a delay to the polling after drain if there's a ball-saver.


Edited by bigus1, Today, 04:59 AM.


#5 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,654 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted Today, 04:40 PM

It makes sense to use the altsound IDs directly in scripts, but they're in hexadecimal,

so you need to convert them to decimal to use them in scripts.

You need a timer to run the TrackSounds.

 

Set MotorCallback = GetRef("GameTimer")

Sub GameTimer
    TrackSounds
End Sub

Sub TrackSounds
    Dim NewSounds, ii, Snd
    NewSounds = Controller.NewSoundCommands
    If Not IsEmpty(NewSounds) Then
        For ii = 0 To UBound(NewSounds)
            Snd = NewSounds(ii, 0)
            If Snd = 3 Then pupevent 03
        Next
    End If
End Sub

 







Also tagged with one or more of these keywords: VPX