Jump to content

Recommended Posts

Posted

I've been learning the basic and advanced programming commands and have a few questions... Assumption is that the following issue is really easy to resolve and has been asked before:

 

ME109 and FW190 profiles... I'm trying to make TG1 be standard low caliber MG and then TG2 to be MG + Cannons so that I can pull partial on TG1 and then when things are lined up perfectly, fire the cannons but simply squeezing harder to TG2. When I "hold" I want to be firing...

 

TG1 appears to work but nothing happens when I pull through to TG2... I'm using hold commands on single TG1 function and 2 functions on TG2... Perhaps I need a "release" on TG1 or maybe TG2 doesn't like to do 2 simultaneous functions when activated...

 

Any ideas on how to get this working?

Posted

Not a bad question, no (I just didn't see it in the flow of posts...).

Are you using TARGET?

 

Here's my code for the A-10, works fine:

 

MapKey(&Joystick, TG1, 'p'); // PAC1

MapKey(&Joystick, TG2, SPC); // PAC2 / shoot

Posted
Not a bad question, no (I just didn't see it in the flow of posts...).

Are you using TARGET?

 

Here's my code for the A-10, works fine:

 

MapKey(&Joystick, TG1, 'p'); // PAC1

MapKey(&Joystick, TG2, SPC); // PAC2 / shoot

 

Thanks for responding.

 

Yes, I'm using Target, though I have not dabbled in the scripting yet which looks like what you provide as an example...

 

BOS has a key for MG and it has a key for MG + Cannons... DCS does not have that so the command for TG2 must include 2 keypresses which it does not appear to like to do while in game... I can pull TG1 and get MG only. But the only way I can activate the Cannons is by pressing TG2 then pressing again, and the MGs stop. What I want is MG when I pull T1 and then cannons simply get added to the spray when the trigger hits the T2 activation point...

Posted
Thanks for responding.

 

Yes, I'm using Target, though I have not dabbled in the scripting yet which looks like what you provide as an example...

 

BOS has a key for MG and it has a key for MG + Cannons... DCS does not have that so the command for TG2 must include 2 keypresses which it does not appear to like to do while in game... I can pull TG1 and get MG only. But the only way I can activate the Cannons is by pressing TG2 then pressing again, and the MGs stop. What I want is MG when I pull T1 and then cannons simply get added to the spray when the trigger hits the T2 activation point...

The code above keeps the first button pressed so reaching TG2 will have both buttons pressed (P and Space).

What can happen is that the shortcuts involve a modifier which makes the first command not working.

Maybe if you post your script here I can pinpoint the problem.

Posted

Is not more easy set this buttons direct in each plane controls?

 

TG1 = fire MG

TG2 = Fire cannon in Bf 109 and MG+Cannon in Fw 190 - this use different electrical set than Bf 109.

 

Since there's no way to press TG2 without press TG1 in the stick, MG and Cannon will fire together.

Posted (edited)
Is not more easy set this buttons direct in each plane controls?

 

TG1 = fire MG

TG2 = Fire cannon in Bf 109 and MG+Cannon in Fw 190 - this use different electrical set than Bf 109.

 

Since there's no way to press TG2 without press TG1 in the stick, MG and Cannon will fire together.

 

That's exact what it should do, it takes either programming tricks or a problem not to have this behaviour.

OP's problem is precisely that he doesn't have this, which is problematic.

 

TG1 appears to work but nothing happens when I pull through to TG2... I'm using hold commands on single TG1 function and 2 functions on TG2... Perhaps I need a "release" on TG1 or maybe TG2 doesn't like to do 2 simultaneous functions when activated...

 

Any ideas on how to get this working?

 

Just one question, something that slipped, what is that "hold" and why would you need to use that?

Keep it simple and it should work.

Anyway, it seems you believe that TG1 will be disabled the moment TG2 is pressed but no it will stay pressed, so no need to do anything fancy.

Edited by PiedDroit
Posted
That's exact what it should do, it takes either programming tricks or a problem not to have this behaviour.

OP's problem is precisely that he doesn't have this, which is problematic.

 

What I want to say is not using the programming software (this "press a button to press keyboard keys").

 

Just assign the buttons in DCS controls:

 

Assign TG1 for MG.

 

Then press and hold TG1, select the cannon function, press TG2. Voilá, done. :thumbup:

 

Don't take a minute for each plane.

Posted (edited)

Since my sim machine is not available, I can't look, but I suspect the OPs problem is related to the keys used in the sim to generate the two commands. If the two commands use one of the same keys, then this problem will occur.

 

For example, ...

 

If TG1 is programmed to output 'SPC' and you need to program TG2 to output 'SPC' + 'Left Alt' then the problem will occur. The basic reason is that the sim will see the 'SPC' key pressed continuously and will ignore the addition of the second key. Even if it saw the second key press correctly, then it would likely only perform the second command and the problem would change but still exist.

 

The solution is to change one of the commands 'in game' so that they don't share a key.

 

Btw, assigning them in game, instead of in Target, will not solve the problem since the common key issue will still exist.

 

I have this issue with another sim, only worse since there are multiple gun commands with keys in common.

Edited by cichlidfan

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Posted
Since my sim machine is not available, I can't look, but I suspect the OPs problem is related to the keys used in the sim to generate the two commands. If the two commands use one of the same keys, then this problem will occur.

 

 

Yes, that was my first assumption (although I didn't phrase it that way).

Posted

For Fw 190 D-9 the default keys is (SIM):

 

MG131 = RCtrl+Space

MG131/151 = Space

 

For Bf 109 K-4

 

Fire Cannon/Rockets (B1) = RAlt+Space

Fire machine guns (A) = Space

 

Btw, assigning them in game, instead of in Target, will not solve the problem since the common key issue will still exist.

 

Why? In this case are assigned the trigger (DX) buttons for one and another function, and both buttons can be pressed at same time, no keys are involved.

Posted

As a general rule, I don't like to change the DCS default mapping but if I have to I will... My question is very simple... Why doesn't the following work right?

 

For FW-190

 

MG131 = RCtrl+Space so... TG1 gets assigned to RCtrl+space with a HOLD command so that while TG1 is pressed, the MG will fire

 

MG131/151 = Space so... TG2 gets assigned to 2 events: RCtrl+space and Space with a HOLD command for each so that while TG2 is pressed, the MG and Cannon will fire

 

Why shouldn't this work?

 

 

For Bf 109 K-4

 

Fire machine guns (A) = Space so... TG1 gets assigned to Space with a HOLD command so that when TG1 is pressed, the MG will fire

 

Fire Cannon/Rockets (B1) = RAlt+Space so... TG2 gets assigned to 2 events: Space and RCtrl+space with a HOLD command for each so that when TG2 is pressed, the MG and Cannon will fire

 

 

Why shouldn't this work?

Posted (edited)

I'm afraid you must reassign LAlt+SPC with something else because you will never manage to get LAlt+SPC and SPC at the same time (try it with your keyboard).

 

If you don't want to touch the keyboard mappings, just map first gun to JOY_BTN1, second gun to JOY_BTN6 in DCS, then use DX1 and DX6 (those are default DX buttons for the triggers on the WH) for TG1 and TG2 on the stick and you're all set.

Edited by PiedDroit
Checked default DX buttons for triggers
Posted

I am trying to use script editor and I manage to get these working functions for BoS but I will check later to DCS too:

 

(c for cannon and m for MGs)

 

//Machine Guns - Cannon

MapKeyIO(&Joystick, TG1,'c' ,'m' );  // S3 Pressed only Cannon -S3 Out only MG
MapKey(&Joystick, TG2, CHAIN('c','m')); //Both Simultaneously 

Posted
I'm afraid you must reassign LAlt+SPC with something else because you will never manage to get LAlt+SPC and SPC at the same time (try it with your keyboard).

 

If you don't want to touch the keyboard mappings, just map first gun to JOY_BTN1, second gun to JOY_BTN6 in DCS, then use DX1 and DX6 (those are default DX buttons for the triggers on the WH) for TG1 and TG2 on the stick and you're all set.

 

 

That makes sense with the alt-space and space... Thanks. It worked.

Posted
I am trying to use script editor and I manage to get these working functions for BoS but I will check later to DCS too:

 

(c for cannon and m for MGs)

 

//Machine Guns - Cannon

MapKeyIO(&Joystick, TG1,'c' ,'m' );  // S3 Pressed only Cannon -S3 Out only MG
MapKey(&Joystick, TG2, CHAIN('c','m')); //Both Simultaneously 

 

This should work, normally you don't need the chain on tg2 but since you can select one or the other on tg1 then you always need to press both on tg2.

I use the event viewer of the TARGET editor a lot for testing the sequences, very useful.

Posted

Fire machine guns (A) = Space so... TG1 gets assigned to Space with a HOLD command so that when TG1 is pressed, the MG will fire

 

Fire Cannon/Rockets (B1) = RAlt+Space so... TG2 gets assigned to 2 events: Space and RCtrl+space with a HOLD command for each so that when TG2 is pressed, the MG and Cannon will fire

 

For Fw 190 D-9 the "Space" only in TG2 is not needed, because RCtrl+space is mapped in DCS controls for fire both weapons - or, is not need TG1 pressed for fire both weapons (is similar to BoS option). :thumbup:

Posted

Use Layers in Target

 

I had solved this using Layers in Target (select "advanced" option when you create the new configuration). Using the boat switch on the throttle to switch between the layers D, M, U I can select whether to fire the MG131 alone or combined with MG151 in the FW-190. In the Bf-109 I can select MG131, or MK108, or both. I like to be able to use the MK-108 alone especially when I fire at big targets where the MG131 has little effect.

I attach the configuration files.

However I have stopped using target because the software crashes quite often when I launch DCS. And when I used it in conjunction with TrackIR and DCS I often could not center my view. Today I have tried several times and each time Target crashed when I launched DCS (version 1.5.2).

So now for Bf-109 I use the Weapon Release button for the MK108 and I manage to fire both MG and MK simultaneously.

For the FW-190 without Target there has never been a problem. Pulling the trigger halfway (TG1) fires the MG131, and pulling it all the way (TG2) fires both. But I found something funny today: the two functions were assigned the wrong way around and I was always firing both MG131 and MG151. I suspect that's a "collateral damage" from the update to 1.5.2. I have corrected the mapping and it works as expected again.

Scripts.zip

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Posted (edited)

For certain things this "press a button to press keys" is very anti-K.I.S.S. :megalol:

 

So now for Bf-109 I use the Weapon Release button for the MK108 and I manage to fire both MG and MK simultaneously.

 

You can use joy trigger TG1 and TG2 for bf 109 assign then (the DX buttons 1 and 6 ) direct in DCS controls... although this prevents use one cannon if want.

Edited by Sokol1_br
Posted
This should work, normally you don't need the chain on tg2 but since you can select one or the other on tg1 then you always need to press both on tg2.

I use the event viewer of the TARGET editor a lot for testing the sequences, very useful.

 

Agree on using the event viewer, when I am building a profile in TARGET I use it quite often to test things as I add commands. Much easier to do it as one goes rather than waiting till the end.

Don B

EVGA Z390 Dark MB | i9 9900k CPU @ 5.1 GHz | Gigabyte 4090 OC | 64 GB Corsair Vengeance 3200 MHz CL16 | Corsair H150i Pro Cooler |Virpil CM3 Stick w/ Alpha Prime Grip 200mm ext| Virpil CM3 Throttle | VPC Rotor TCS Base w/ Alpha-L Grip| Point Control V2|Varjo Aero|

Posted
I am trying to use script editor and I manage to get these working functions for BoS but I will check later to DCS too:

 

(c for cannon and m for MGs)

 

//Machine Guns - Cannon

MapKeyIO(&Joystick, TG1,'c' ,'m' );  // S3 Pressed only Cannon -S3 Out only MG
MapKey(&Joystick, TG2, CHAIN('c','m')); //Both Simultaneously 

 

One last trick, calling DX in the script is perfectly legal, this will work too:

 

MapKeyIO(&Joystick, TG1,DX1,DX6); // S3 Pressed only Cannon -S3 Out only MG

MapKey(&Joystick, TG2, CHAIN(DX1,DX6)); //Both Simultaneously

Posted
Yes! I read it!

I ve just built a profile only one script fos BoS!

 

This weekend I try to mod it for DCS 109 and/or 109

 

I am posting it here to take a look and advice !:)

 

It's WIP!

One remark: you should a different REXEC ID for the rudder trim (it's the same as X's, 0).

Looks good to me, good snippets to take example from :thumbup:

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...