Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MAMEHooker Script Options  (Read 600 times)

0 Members and 1 Guest are viewing this topic.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 806
  • Last login:Today at 07:40:31 am
MAMEHooker Script Options
« on: November 19, 2023, 10:53:40 am »
Hello everybody, I am toying with a SNK positional gun a friend of mine gave me.
I am testing the kicker with some games.
As most of you already know, there are games like Operation Thunderbolt outputting a state HIGH message when keeping the trigger pressed, not a pulsating HI/LO state change. To face this, I wrote a simple MAMEHooker script that should loop forever when the trigger is pressed to alternate the kicker state.

This is the script I wrote (othunder.mhs)
Code: [Select]
cmw 4 1., cmw 4 %Player1_Recoil_Piston%, cmw 4 x
wat 50
cmw 4 1., cmw 4 0, cmw 4 x

Now, as far as I know if I call this script from othunder.ini with the command "lfs" (loop from the script?) the script should loop forever:
Code: [Select]
Player1_Recoil_Piston=lfs othunder 0 %s%
Unfortunately it does not. It makes nothing. If instead I use read from the script (rfs) function, it works (only once, as expected)
Code: [Select]
Player1_Recoil_Piston=rfs othunder 0 %s%
Could someone confirm the function lfs actually works or eventually point out what I am doing wrong?
Thanks! :)
« Last Edit: November 19, 2023, 10:55:37 am by baritonomarchetto »

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 806
  • Last login:Today at 07:40:31 am
Re: MAMEHooker Script Options
« Reply #1 on: November 21, 2023, 12:53:24 am »
Made some further testings yesterday. Looks like the "lfs" command doesn't like a waiting time equal to zero. Rising it to "20" fixed the issue :)