Page 1 of 1

Trying to intercept/get wasd input, for alternate car controls.

Posted: Wed Sep 04, 2024 2:29 am
by Ranakastrasz
So, The idea was pretty much to make a mod that did the cardinal car controls. However, getting the WASD keys isn't directly possible. I tried several ideas, and have a few more, but actually doing some of them is beyond me,

Capture "walking.direction" - only works with character, not when in vehicle.
Capture "player.riding_state" - Works, but I have to set this to alter Car behavior, which causes it to not work. - Current file displays this.
Hotkeys - Only registers keypressed, not holds or releases.

Options that might work.
- Override car behavior entirely. Not actually sure if there is a way to set the acceleration/turning without overriding controls. Might be able to do an on-tick manually cancel out movement (or set acceleration/turning to 0 or infinitesimal) and manually set the location of the car each tick. But I dont actually know how the car has to behave precisely, and those kinds of things tend to hog update cycles.

- Dummy player. Somehow add a dummy player/car that the player controls, rather than the actual vehicle, which can "Move" enough for the direction/riding_state to be set, captured, and not overridden by the car's instructions. Also probably needs to handle 2 players in a car and weapon control and inventory crap and so on, but might be possible.

-Capture Actual keypresses/holds/releases. Can't, API denied, for latency/performance reasons. Wish I could register as hotkeys anways.

Any other ideas, or ideas on how I might get one of the two ideas to work? Or am I missing something obvious?

Re: Trying to intercept/get wasd input, for alternate car controls.

Posted: Wed Sep 04, 2024 8:03 am
by Bilka

Re: Trying to intercept/get wasd input, for alternate car controls.

Posted: Wed Sep 04, 2024 4:18 pm
by Ranakastrasz
Yea. However, it also has no collisions, different movement, no turn radius, and weird graphics (bouncy, preemptive turning as a side effect)

Might have collision, but no collision damage would have to check on that part.

Edit:

The idea was to got as close as physically possible to purely altering the control scheme, while leaving literally everything else untouched. So turn radius, collision, acceleration, appearance.

Re: Trying to intercept/get wasd input, for alternate car controls.

Posted: Wed Oct 30, 2024 11:03 pm
by jamiechi1
You don't want to just look at wasd. Many of us use the arrow keys.

Re: Trying to intercept/get wasd input, for alternate car controls.

Posted: Thu Oct 31, 2024 1:56 am
by Ranakastrasz
Arrow or WASD. Doesn't matter. I just want to be able to change car controls to polar controls. Ideally it would work with wasd and arrow keys, just the same.