DreyMIX Posted December 15, 2019 Share Posted December 15, 2019 Hello, currently I have created a small script with AutoHotKey in "Tools -> Manage Emulators -> Running AutoHotkey Script", which allows me to associate the 2 buttons of the joystick 2, as second player for Dragon's Lair. The code is as follows: ; Start 2 2Joy7:: Send, 2 return ; Coin 2 2Joy9:: Send, 6 return I have already configured the keys in the DaphneLoader.exe configuration: Dragon's Lair -> Configure -> Input: Start 2 = Primary Key -> 2 Coin 2 = Primary Key -> 6 When I start it from LaunchBox or BigBox the keys on the keyboard work. Instead on the joystick of the second player, only the button associated with the "key 6" (2Joy9) of the keyboard (the one that gives the token) works for me. The other button (start 2 - 2Joy7) does not want it to work. And the button number is right, because if I start the AutoHotkey script on Windows and press one of the two joystick buttons with the notepad active, the correct keyboard input is sent. What's wrong? Thx! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 15, 2019 Share Posted December 15, 2019 If you're seeing a "2" and a "6" in Notepad when pressing buttons on the P2 controller then ya, the script is good. (Though I don't think "return" is necessary. But doesn't hurt anything) If you start the AHK script in Windows and then load Dragon's Lair directly through Daphne (outside of LaunchBox) , do the player 2 buttons work there? Quote Link to comment Share on other sites More sharing options...
DreyMIX Posted December 15, 2019 Author Share Posted December 15, 2019 Sorry, I didn't specify that I have an arcade stick. But oh well I don't think it involves anything. The "return" code I think is important, because if I remove it and press one of the 2 binded buttons, AutoHotkey will press me both (2 and 6). Tested directly on Notepad. As soon as I can, I'll try as you say. Thanks in the meantime. Quote Link to comment Share on other sites More sharing options...
DreyMIX Posted December 16, 2019 Author Share Posted December 16, 2019 23 hours ago, JoeViking245 said: If you start the AHK script in Windows and then load Dragon's Lair directly through Daphne (outside of LaunchBox) , do the player 2 buttons work there? Nothing doesn't work. The key associated with the "6" works, while the other, the "2" key, does not work. As usual, if I press it physically on the keyboard, it goes into 2 player mode. If I open notepad, both buttons work properly. Why does he do this? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted December 16, 2019 Share Posted December 16, 2019 So it sounds like there's something not right between the Arcade Stick controller and Daphne. I don't use either one of those so I can't really help. And you were correct about using 'return' in the script. My apologies. Quote Link to comment Share on other sites More sharing options...
DreyMIX Posted December 20, 2019 Author Share Posted December 20, 2019 Thanks anyway. I hope he can help someone else. Quote Link to comment Share on other sites More sharing options...
DreyMIX Posted December 24, 2019 Author Share Posted December 24, 2019 (edited) I finally solved the problem !!! I modified the script like this: 2Joy7:: Send {2 down} Sleep 400 Send {2 up} return 2Joy9:: Send, 6 return Don't ask me why it works now. But evidently by adding a small pause of 400 milliseconds, the script manages to correctly send the correct impulse to the game. The 400 is a value that I gave at random the first time, maybe it can be lowered more. But it doesn't matter, since it works for me now. Edited December 24, 2019 by DreyMIX 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.