PDA

View Full Version : Refuelling in LoMac



brewber19
23rd April 2006, 11:27 AM
Hi All,

Not sure if this is the correct place to post but...hope you can help me.

I fly the Su-25 and 'T' in LoMac and on the rare occasions I make it back to base it takes ages to refuel and I have to keep my fingers on CTRL+R or a button with CTRL+R mapped to it....what I'm looking for is to have a button on my fighterstick to "activate" a constantly repeating CTRL+R until the tanks are full or until I hit the same button again to stop sending CTRL+R.

Anyone got any ideas how I can accomplish this? I am a bit simple re: scripting/programming etc, I've only really managed to use keystroke recorder and listing so be gentle with me ;)

Thanks in advance for your help.

Revvin
23rd April 2006, 11:58 AM
You could use a small sequence CMS script like this:





SEQUENCE
WAIT( JS1.B3 ); // Wait for button 4 to be pressed on the Fighterstick
CMS.B1 = TRUE; // Refuelling key held down
WAIT( JS1.B3 ); // Wait for button 4 to be pressed again on the Fighterstick
CMS.B1 = FALSE; // Refuelling key released
ENDSEQUENCE





JS1.B3 is button 3 on the fighterstick - assuming your fighterstick is in the first tab after 'Program Settings' in control Manager. This is the red button on the top side of the stick. You then need to add CMS controls to your map if you have not done so already. To do this click on the 'Add' button http://www.ch-hangar.com/SiteFiles/Images/faq/cmaddbtn.jpg and select CMS Controls which is at the bottom of the list in the menu that pops up. Once you've done this a 'CMS Controls' tab will be added to your list of controllers in Control Manager. Click on that tab and you'll see an array of CMS buttons and axis shown as grey elipses. Click on CMS button 1 in the top left corner and you'll see you can map controls to it just like a joystick buttonso insertthe command you need (not sure if you need to use HOLD CTL r or just CTL r but you have that command working so you'll know which one works).



Once you've done that you need to tell Control Manager which physical button on your controlelrs you want to activate this virtual CMS button. This is where the script comes in. Click on the 'CM Editor' button http://www.ch-hangar.com/SiteFiles/Images/faq/cmeditorbtn.jpg and you'll have a pop up window where you will now paste the above script between the 'script' and 'endscript' commands. So now what happens is you will press the Fighterstick button 3 and that makes CMS B1 activate until you press button 3 on the fighterstick again to release it.



You can modify the activation button by just changing the JS reference i.e. JS1.B1 would be the Fighterstick trigger etc. To know which button is which just let your mouse hover over a button in the image of the Fighterstick in the Control Manager window.



I'll move this to the programming forum later.

DonULFonso
23rd April 2006, 01:32 PM
Same buttons, different approach, same results:


TOGGLE ( D1 ) = JS1.B3;
CMS.B1 = D1;

The physical joystick-button JS1.B3 toggles the device-variable D1 on/off; then this device-variable activates the logical CMS-button CMS.B1, with the desired output assinged to this logical button CMS.B1 instead of the physical joystick-button JS1.B1.

Bear with me, I'm short of time right now, so I can't reply in my usual long winded manner :rolleyes: . Anyway, Welcome to The Hangar :cheers: , brewber19 :salute: !

brewber19
26th April 2006, 01:41 PM
Hey Guys,

Thanks for the brilliant and prompt feedback...I didnt get email notifications of your reply so apologies for my delay in getting back to you!

Right, I'll try both these methods as I might actually learn something for a change - its not like I actually manage to LAND that often but when I do, man does the Su-25T take forever to refuel...I could go cook and eat a meal by the time it refuels 2500kg of fuel.

Thanks again, and for the warm welcome to the CH forum.

Brewber