Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
steering wheel button behaves different than keyboard button
05-12-2008, 03:32 PM,
steering wheel button behaves different than keyboard button
Hi *,

I am working right now on vamosworld.cpp for my prototype and have some weird problem:

As there is no need in my prototype for a TCS toggle key, I have changed its functionality:

else if (dofunction == "tcs_toggle") {
  // old code
  "some new code"

Furthermore, I changed the control setting of the TCS toggle key from "once" to "held". If I use the keyboard and press "z" (the default key for TCS toggle), "some new code" is executed as long as I press this button (here: a message is displayed in the HUD).

But if I use my steering wheel (having mapped TCS toggle to one of its buttons - also with the "held" option), "some new code" seems to be executed without the button being pressed (i.e. my message is always displayed in the HUD). Pressing the button does not do anything. I have played around with the settings "button control delay", "held/once" and "up/down" but without success. Any hints on how I can make the steering wheel button behave as the keybord button?


05-12-2008, 09:02 PM,
If you define the button options as down and held in the "assign controls" menu, it should work as you want. For example, I've got a joystick button mapped to the handbrake as held/once and it works fine. Make sure you delete any other controls assigned to that function.

In vamosworld.cpp@1156 you'll find the code for querying for joystick state.

Forum Jump:

Users browsing this thread: 1 Guest(s)