The NEW Build Your Own Arcade Controls

Front End Support => MaLa Frontend => Topic started by: CWorley on March 04, 2012, 01:03:20 am

Title: Both Start Butttons able to Initiate Game?
Post by: CWorley on March 04, 2012, 01:03:20 am
Is there a way to have both player 1 and player 2 start buttons able to start a game from the mala menu?
Title: Re: Both Start Butttons able to Initiate Game?
Post by: Well Fed Games on March 04, 2012, 01:22:36 am
Is there a way to have both player 1 and player 2 start buttons able to start a game from the mala menu?


Only from looking for a way to do so myself, no... it seems you can only assign one button to start game. Would love to know a good way though!
Title: Re: Both Start Butttons able to Initiate Game?
Post by: nitz on March 04, 2012, 04:56:27 pm
I don't think Mala can do this out of the box, but download and install AutoHotKey, dump this in a text file and rename it to have the .ahk extension

Quote
setTitleMatchMode, 2

#IfWinActive, MaLa
2::1

and have this running whenever you use Mala. This assumes that 1 and 2 are your player 1 and player 2 start buttons. This script just maps the 2 key to 1 but only in Mala. So if you have 1 set to start, pressing either 1 or 2 will start a game. Hope this helps.
Title: Re: Both Start Butttons able to Initiate Game?
Post by: jimmy2x2x on March 04, 2012, 05:07:01 pm
Another way if you are using an Ipac would be to remap the shift operation of "2" to another key and have this key start the game, key 1 is the default shift key on an Ipac.


Title: Re: Both Start Butttons able to Initiate Game?
Post by: TopJimmyCooks on March 04, 2012, 07:50:34 pm
With help from Nitz I used autohotkey to start games in mala on 2, 5 or 6 as well as 1.  post up if you have any trouble getting a script set up. 
Title: Re: Both Start Butttons able to Initiate Game?
Post by: CWorley on March 06, 2012, 10:06:45 pm
I don't think Mala can do this out of the box, but download and install AutoHotKey, dump this in a text file and rename it to have the .ahk extension

Quote
setTitleMatchMode, 2

#IfWinActive, MaLa
2::1

and have this running whenever you use Mala. This assumes that 1 and 2 are your player 1 and player 2 start buttons. This script just maps the 2 key to 1 but only in Mala. So if you have 1 set to start, pressing either 1 or 2 will start a game. Hope this helps.

Can you expand on how to do this?  I've downloaded autohotkey and created a .ahk file with your text.  Is there another step?  Thanks!
Title: Re: Both Start Butttons able to Initiate Game?
Post by: TopJimmyCooks on March 07, 2012, 09:40:23 am
This is what worked for me.  I don't know if the Persistent call is required, but it works.  Everything else I had to put in or it wouldn't work.  If you don't want coin buttons 5 and 6 to start a game you can leave those out.  Also, I compiled this to .exe using the tool that comes with AHK, that worked better for me for some reason. 

Code: [Select]
;
;This script is to use either coin up button, either start button or either fire button to start a game while in MaLa.

setTitleMatchMode, 2

DetectHiddenWindows,on

#IfWinActive, MaLa

#Persistent
2::1
5::1
6::1
return
Title: Re: Both Start Butttons able to Initiate Game?
Post by: CWorley on March 07, 2012, 09:58:49 am
After compiling the code into an .exe file, is there anything else that needs to be done?  Do I need to run that file before starting Mala or should it run on its own when Mala starts?
Title: Re: Both Start Butttons able to Initiate Game?
Post by: TopJimmyCooks on March 07, 2012, 10:40:18 am
Put it in your windows startup folder so it runs anytime windows is running.  The IfWinActive = mala call will only allow it to change the inputs if the mala window is active, so it won't mess up any other programs. 
Title: Re: Both Start Butttons able to Initiate Game?
Post by: CWorley on March 16, 2012, 10:19:35 am
Thanks guys.  Got it working.  I'm using Mala Launcher to run the code when Mala starts.
Title: Re: Both Start Butttons able to Initiate Game?
Post by: TopJimmyCooks on March 16, 2012, 10:37:22 am
[Beavis]

HehHehHeh.  He said "third input"  Heh Heh.

[/Beavis]

 >:D
Title: Re: Both Start Butttons able to Initiate Game?
Post by: MTPPC on March 27, 2012, 12:22:49 am
If you are using a joystick adapter or a trackball with mouse button inputs, you can use those inputs as the second button and assign it to start the game so you could have 3 (keyboard, mouse and joystick) buttons assigned to start the game. I'm currently using keyboard 1 and mouse left to start games.