CAPTAIN SIM FORUM
Weapon for FSX >> Weapon for FSX >> Button 1 won't fire weapons
https://www.captainsim.org/forum/csf.pl?num=1298727564

Message started by vic007 on Feb 26th, 2011 at 1:39pm

Title: Button 1 won't fire weapons
Post by vic007 on Feb 26th, 2011 at 1:39pm
First of all let me congratulate you on (what I consider anyway) a very good and innovative product. My only issue with this addon at the moment is that my button 1 on my joystick will not fire weapons. The space bar works fine  I have flicked through the sdk but can not see anything that might help me.  Any ideas?  For info I have CH products - Combat stick, pro throttle and pedals.

Title: Re: Button 1 won't fire weapons
Post by boeing247 on Feb 26th, 2011 at 7:55pm
Hi there! Were you the one who asked me about the chopper?

Anyways, this is an easy fix. My Logitech Extreme 3D joystick has Button One mapped as brakes, so obviously my weapon did not work. I remapped it to button three (which was in a more realistic place, anyways) like this:

1. Go to your SimObjects folder (in the fsx folder) and go to CS_FA-18 and open "CS_Weapon". If you can't open it because you don't have the right programs (I'm not sure what you need, I just use dreamweaver, but notepad might work, I'm not sure), tell me and I'll send you a modified file.
2. Search for (Ctrl+F to search) this text: <Action name="fire" control="joystick:0:button:0" />
3. See the part that says "button:0"? Find the new button that you want to change the firing mechanism to and subtract one, then replace 0 with the number. For example, I remapped to button 3, 3-1=2, so I wrote button:2.
4. Save and go test. Tell us if it works!  :)

Note: Make sure the button which you are mapping to DOES NOT HAVE A PREVIOUS FUNCTION MAPPED TO IT. That's why your first button (#1) doesn't work.

Happy Flying!

Title: Re: Button 1 won't fire weapons
Post by vic007 on Feb 26th, 2011 at 9:13pm
Thanks for the info Boeing 247 and yes it was me that asked for the helo. Thanks for the quick reply on that. However your fix for my joystick did not work :'(  Could it be that I have multiple input devices?

Title: Re: Button 1 won't fire weapons
Post by boeing247 on Feb 26th, 2011 at 9:47pm
Did you try multiple joystick buttons? Maybe the new button was already assigned to something else... Does your joystick ever have problems?

What do you mean multiple input devices? Like more than one joystick?

Title: Re: Button 1 won't fire weapons
Post by Markoz on Feb 27th, 2011 at 7:53am

boeing247 wrote on Feb 26th, 2011 at 7:55pm:
My Logitech Extreme 3D joystick has Button One mapped as brakes, so obviously my weapon did not work.

My brakes and the firing of guns/rockets are both mapped to Button 1 on my Logitech Extreme 3D Pro joystick. It works fine set like that. I just need to make sure that the Weapon is turned OFF if I need to use the brakes. I have ended up firing guns or rockets after landing and applying the brakes. ;D

Mark

Title: Re: Button 1 won't fire weapons
Post by boeing247 on Feb 27th, 2011 at 8:33am
Maybe your joystick has issues. Try testing it (go to control panel and find the game controller icon), and maybe re-calibrate it.

Title: Re: Button 1 won't fire weapons
Post by Astoroth on Feb 27th, 2011 at 8:47am
With multiple input devices there is a good chance that your joystick is not set to device 1, which is what the weapon.xml looks for. For instance, I have a joystick, yoke, throttle quadrant and gamepad all plugged in, and my joystick is actually joystick 3. so try playing around with the numbers in this line:

<Action name="fire" control="joystick:3:button:0" />

On one of the aircraft that you have installed the weapon in, open the csweapon.xml and look for the above line.

Leave button:0 alone, and just change the numbers on the joystick. Try them in sequential order, 0,1,2,3,4 etc. until you find the one that works. You will have to manually change that line in each aircraft that you have installed the weapon in. In order to fix it for new installs, once you figure out which number to assign your joystick, then you can edit the master .dat file with notepad to assign it to the correct joystick for all new installs. But, unless you know what you are doing, I would recommend leaving the master .dat file alone, and just editing future installs. One character out of place, and all new installs will be hosed.


Title: Re: Button 1 won't fire weapons
Post by vic007 on Feb 27th, 2011 at 12:19pm
Thanks Boeing 247. I have just got home from work and guess what it is now working.  Has a matter of interest I have a joystick, a  separate throttle with a micro joystick and rudder pedals. I checked the buttons on my throttle and had no joy so tried my joystick and Low and behold button one is now working. Thanks again for your efforts

Title: Re: Button 1 won't fire weapons
Post by boeing247 on Feb 27th, 2011 at 5:35pm
Glad it's working. If the problem returns (though something like this generally doesn't), just make another post.  :)

Title: Re: Button 1 won't fire weapons
Post by frankwi on Apr 3rd, 2011 at 3:46pm
After I make the change to the csweapon.xml, what do I need to do to see the change ? In other words, can I make the edit, save it, and just reload the plane, or do I need to choose another plane first, then reload the one I am tweaking ?

I have the X52 FCS and separate rudder pedals. When I go to "Controls" in FSX it also shows two entries for some sort of mouse control before the FCS and pedals. I have tried setting the controller from 0-5 in csweapon.xml and cannot get the fire button to work. That's why I am asking what process to use to see the changes after the edit.

I also noted that the "button" entry is one off from the actual hardware button so I tried assigning the button as "0" for the fire button press half way and "14" for fire button fully dpressed. No joy.

Title: Re: Button 1 won't fire weapons
Post by boeing247 on Apr 5th, 2011 at 1:30am
Close flight simulator, open the XML file, make the change, save and close the XML file, and open flight simulator. The change should be there (if it's not, experiment and find the correct joystick number and button).  

Title: Re: Button 1 won't fire weapons
Post by frankwi on Apr 5th, 2011 at 2:40am
Thanks for the reply!

I was just reloading the plane after the edit and not getting in and out of FSX. I'll give it a try.

Title: Re: Button 1 won't fire weapons
Post by boeing247 on Apr 5th, 2011 at 4:22am
For future reference, if you mess with something in the fsx folder, you'll need to do it with FSX closed. You see, when FSX opens, it loads the files in the various folders which it draws from and doesn't load them again until you close and reopen it.  :)

CAPTAIN SIM FORUM » Powered by YaBB 2.6.0!
YaBB Forum Software © 2000-2024. All Rights Reserved.