CAPTAIN SIM FORUM
Weapon for FSX >> Weapon for FSX >> Weapon Select XML
https://www.captainsim.org/forum/csf.pl?num=1568904838

Message started by ormoc44 on Sep 19th, 2019 at 2:53pm

Title: Weapon Select XML
Post by ormoc44 on Sep 19th, 2019 at 2:53pm
I'm making a new 2D Weapon Control panel which resembles the one in the actual aircraft.

Everything is working except the weapon select buttons.

Looks like the on the original it uses a knob to cycle through weapon types. 

On the new one looking just for push buttons. So if the push button is selected it goes to that position instead of cycling.

For example, I used this mouse click code which should bring it to the number 2, RCKT position:

    <Mouse>
     <Help ID="Station 4"/>
     <Tooltip ID="">Station 4</Tooltip>
     <Cursor Type="Hand"/>
     <Click>(>L:CSG_WpnSelect, position) 2</Click>
</Mouse>

However, when the push button is clicked on this position it jumps (or cycles) back to the first position for the Gun.

Any ideas would be appreciated.

Title: Re: Weapon Select XML
Post by Markoz on Sep 19th, 2019 at 3:27pm
Where are you placing the code?

What you need to do by default, is either mouse click on the Weapon Type Selector Switch (on the Weapon PanEL), or use Ctrl+7 to cycle through weapon types.

Title: Re: Weapon Select XML
Post by ormoc44 on Sep 20th, 2019 at 12:58am
Thanks, that's a good idea with the cntrl+7. 

Just wondering if this can be edited to a single keystroke to replace the cntrl+7 under the CSweapon.xml?

        <Action name="nextWeaponType" control="Ctrl+7" />
        <!-- weapon type selector switch -->

If so, then maybe I can use the key equivalent in the mouse click area of the switch?

 

Title: Re: Weapon Select XML
Post by Markoz on Sep 20th, 2019 at 3:19am
I assume you would have to make those changes to the CSWeapon_panel.xml, which is a part (a file) of the CSWeapon_panel.cab (which can be found in the FSX\Gauges folder).

You do this at your own risk. So...

Backup the CSWeapon_panel.cab BEFORE you make any chages to the CSWeapon_panel.xml within it!!!  ;)

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