Closed skaftanis closed 6 years ago
Hey @skaftanis, Thanks for the feedback.
I think the problem is that you are setting a button value to -1.
Buttons take need a Truthy and Falsey value:
try this:
while True:
MyVirtual.set_value('BtnX', 1)
time.sleep(0.1)
MyVirtual.set_value('BtnX', 0)
time.sleep(1)
Thanks! It works fine :)
Hi, thank you for the very good job here!
I'm trying to use this on a racing game. Axis and triggers looks fine, but I have a problem with buttons. I want to use buttons for up shifting and down shifting. So, I want to create a simple example where the agent down shift one gear every second. I use this code
But the car down shift one time, then the control disconnects from the game for some reason and the game go on pause menu.
The disconnect is not the problem thought for example when I steer the car with:
it works fine after the pause (I just skip the pause pressing ESC) and then it doesn't disconnect again. So the problem is possibly just with buttons (or just the release of the button, I don't know). Can you help me with that?