PDA

View Full Version : Can This mapping to mini joy be done


Firefox
14-02-2005, 09:54 PM
OK Im a scripting dummy .... SO I come to the experts. I cut and paste this to you to see if this action can be done to the mini joystick. WWIIONLINE Tank guns with a joystick are a pain to aim. I would love to have this smaller slew fucntion set to the mini joy rather than a keyboard

Fine Tune Turrets


Â* Â* Basically, i set the keys i want in the keyboard axis screen to 40% for down or left and 60% for up or right, then i save and go into the tank.cfml and look under the turret elevate function or turret traverse function and change the value setting in the keyabsolute tag closer to 50%. since 40% is down or left, i change where it says value="40" to value="44". since 44 is closer to 50 than 40 is, it will move slower. same for above 50%, i would change value="60" to value="56". note:on turrets there is a built in deadband of 5 on either side of 50 so the slowest number you can enter is 44 or 56 [depending on the direction]. make both directions are equally apart from 50 or going in one direction will travel at a different speed than the other direction.here's the cfml for turrets after i map them in the keymapper.

<control function="turret traverse">
<joyaxis stick="1">x</joyaxis>
<keyabsolute value="40" onrelease="50" index="4">
<key>left arrow</key>
</keyabsolute>
<keyabsolute value="60" onrelease="50" index="6">
<key>right arrow</key>
</keyabsolute>
</control>
<control function="turret elevate">
<joyaxis stick="1">y</joyaxis>
<keyabsolute value="40" onrelease="50" index="4">
<key>down arrow</key>
</keyabsolute>
<keyabsolute value="60" onrelease="50" index="6">
<key>up arrow</key>
</keyabsolute>
</control>

Now what i do is modify the values as such

<control function="turret traverse">
<joyaxis stick="1">x</joyaxis>
<keyabsolute value="44" onrelease="50" index="4">
<key>left arrow</key>
</keyabsolute>
<keyabsolute value="56"onrelease="50" index="6">
<key>right arrow</key>
</keyabsolute>
</control>
<control function="turret elevate">
<joyaxis stick="1">y</joyaxis>
<keyabsolute value="44" onrelease="50" index="4">
<key>down arrow</key>
</keyabsolute>
<keyabsolute value="56"onrelease="50" index="6">
<key>up arrow</key>
</keyabsolute>
</control>

Then save the file.

Try out different values to find the ones that are comfy for you. remember, closer to 50 the slower, keep the distances even, and below 50 is left/down and over 50 is up/right.this can be done for any turret, not just tanks. make sure if you don't cross map keys such as deploy in the stug.note:if you get stuttering when moving the turret with these controls, be sure to up your joystick deadband on both the x and y axis on the calibration screen because you are getting spikes. remember: you can rename the calib file for a category or specific vehicle. [such as tank.calib and when you take out a tank, that calibration file is used instead of the global one]Â* [/b]


Thanks