Forums » Community Projects
AnalogToDigital
http://www.voupr.com/plugin.php?name=analogtodigital
Allows you to bind joystick axes to commands that normally require digital controls (e.g. +Shoot1, +Turbo, etc.)
/a2d help
/a2d clear <js> <axis>
/a2d clear_all
/a2d print
/a2d set <js> <axis> <high threshold> <high command> <low threshold> <low command>
Example: /a2d set 0 4 500 +Shoot1 -500 +Shoot2
The thresholds range from +/- 1000.
You can disable either command by setting it to an empty string, or by setting the threshold to a number outside of the +/- 1000 range.
Allows you to bind joystick axes to commands that normally require digital controls (e.g. +Shoot1, +Turbo, etc.)
/a2d help
/a2d clear <js> <axis>
/a2d clear_all
/a2d print
/a2d set <js> <axis> <high threshold> <high command> <low threshold> <low command>
Example: /a2d set 0 4 500 +Shoot1 -500 +Shoot2
The thresholds range from +/- 1000.
You can disable either command by setting it to an empty string, or by setting the threshold to a number outside of the +/- 1000 range.
Pretty fly plugin.
This... is AWESOME.
I threw together a hack once to do this, but never made it into a real usable plugin. Very cool. :D
Why it's not part of the default control configuration, I'll never understand...
I threw together a hack once to do this, but never made it into a real usable plugin. Very cool. :D
Why it's not part of the default control configuration, I'll never understand...
Is there any way to get it to toggle off +zoom when you zero out the axis? For example:
/a2d set 0 4 500 targetfromt -500 +zoom
If you press the hat to zoom, it doesn't unzoom until you press and release the key (usually 'i') bound to +zoom
/a2d set 0 4 500 targetfromt -500 +zoom
If you press the hat to zoom, it doesn't unzoom until you press and release the key (usually 'i') bound to +zoom
It was supposed to be doing that already. I'll look into it this afternoon.
Version 1.2 now available. See link first post.
It turns out that +turbo and +shoot[1-3] are abnormal. They are canceled by running the same command with '0' as the first parameter, e.g. "+turbo 0". The other movement commands also work that way, but can't be used through a plugin so they're irrelevant. The rest of the +commands, like +zoom, +ptt, +cfire1, etc. are canceled by changing the + to a -, e.g. "-zoom".
So, now the code has special cases for +turbo and +shoot[1-3], and for everything else it just swaps the + for a -.
It turns out that +turbo and +shoot[1-3] are abnormal. They are canceled by running the same command with '0' as the first parameter, e.g. "+turbo 0". The other movement commands also work that way, but can't be used through a plugin so they're irrelevant. The rest of the +commands, like +zoom, +ptt, +cfire1, etc. are canceled by changing the + to a -, e.g. "-zoom".
So, now the code has special cases for +turbo and +shoot[1-3], and for everything else it just swaps the + for a -.
Do you think it could it be possible to stack commands on the same axis?
I've got a stick with a throttle lever, which isn't really suited to VO, but with a2d I can set a high and low threshold so that the throttle binds to accelerate and decelerate reliably on both f/a and physics mode.
what would be nice though, would be to set saturation points, so that on an axis from -1000 - +1000, at +500 accelerate is activated, and then at +800 the turbo kicks in. The same could be used with brakes and decelerate/reverse on the -ve axis?
I know it's a pretty specific issue, but is it something that could work?
I've got a stick with a throttle lever, which isn't really suited to VO, but with a2d I can set a high and low threshold so that the throttle binds to accelerate and decelerate reliably on both f/a and physics mode.
what would be nice though, would be to set saturation points, so that on an axis from -1000 - +1000, at +500 accelerate is activated, and then at +800 the turbo kicks in. The same could be used with brakes and decelerate/reverse on the -ve axis?
I know it's a pretty specific issue, but is it something that could work?
If you're asking whether it's doable, yes, definitely. If you're asking whether I will do it, well, probably not unless you offer me some kind of motivation (10M credits, or a few hundred gauss mkIII, or new glasses, whatever).
You could try doing it yourself. The best way to learn to program is by working on projects that are immediately useful to you.
You could try doing it yourself. The best way to learn to program is by working on projects that are immediately useful to you.