Regarding Joysticks and running...

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Regarding Joysticks and running...

Re: Regarding Joysticks and running...

by Matt » Sun Feb 03, 2019 11:26 pm

"if(player.cmd.forwardmove>6400)" should approximate it

Regarding Joysticks and running...

by R4L » Sun Feb 03, 2019 9:44 am

Hey ya'll. Posted on the discord but figured I should drop a thread here just in case.

I'm experimenting with using a controller for Dreadnought because hey, Metroid Prime was played with a controller and I actually have users who wish to play Dreadnought the same way, so I've been trying to come up with a control scheme that works. I've been pretty successful, except with running. I've noticed that no matter what you map the run button to, you will actually never run. I read somewhere this is due to how the joysticks work, and I've noticed that depending on the sensitivity, you can run MUCH faster without even having a run button mapped.

This presents a problem for me, because there is a power up that won't activate unless you're holding Run and Forward, and this in turn stops the user from using a new function I've implemented in Dreadnought with a controller. I'm just curious if there is a simple solution to this, or if I have to create a workaround for it. I'd like the option to use a controller to be viable still.

As usual, any help is certainly appreciated! :)

EDIT: Ah, and of course I find my answer:
Note: Currently, joystick or mouse axes bound to movement will not set the corresponding button for the purposes of reading by this function. (E.g. moving forward by pressing forward on an analog joystick will not set the BT_FORWARD key.) However, pressing a keyboard key does set the axis inputs. Therefore, it is recommended that mod authors read the axes above whenever possible, instead of relying on [MOD]INPUT_[OLD]BUTTONS to read directional movement.

Top