Cavemanhead Posted January 20, 2016 Posted January 20, 2016 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?
Cavemanhead Posted January 21, 2016 Author Posted January 21, 2016 Is it that bad of a question? :cry:
PiedDroit Posted January 21, 2016 Posted January 21, 2016 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
Cavemanhead Posted January 21, 2016 Author Posted January 21, 2016 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...
PiedDroit Posted January 21, 2016 Posted January 21, 2016 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.
Sokol1_br Posted January 21, 2016 Posted January 21, 2016 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.
PiedDroit Posted January 21, 2016 Posted January 21, 2016 (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 January 21, 2016 by PiedDroit
Sokol1_br Posted January 21, 2016 Posted January 21, 2016 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.
cichlidfan Posted January 21, 2016 Posted January 21, 2016 (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 January 21, 2016 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:
PiedDroit Posted January 21, 2016 Posted January 21, 2016 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).
Sokol1_br Posted January 21, 2016 Posted January 21, 2016 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.
Cavemanhead Posted January 22, 2016 Author Posted January 22, 2016 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?
PiedDroit Posted January 22, 2016 Posted January 22, 2016 (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 January 22, 2016 by PiedDroit Checked default DX buttons for triggers
Swaty Posted January 22, 2016 Posted January 22, 2016 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 [sIGPIC][/sIGPIC] My Pit
Cavemanhead Posted January 22, 2016 Author Posted January 22, 2016 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.
PiedDroit Posted January 22, 2016 Posted January 22, 2016 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.
Sokol1_br Posted January 22, 2016 Posted January 22, 2016 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:
LeCuvier Posted January 22, 2016 Posted January 22, 2016 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
Sokol1_br Posted January 22, 2016 Posted January 22, 2016 (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 January 22, 2016 by Sokol1_br
dburne Posted January 22, 2016 Posted January 22, 2016 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|
PiedDroit Posted January 22, 2016 Posted January 22, 2016 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
Swaty Posted January 22, 2016 Posted January 22, 2016 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!IL-2 BoS.zip [sIGPIC][/sIGPIC] My Pit
PiedDroit Posted January 29, 2016 Posted January 29, 2016 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:
Swaty Posted January 29, 2016 Posted January 29, 2016 (edited) Thank you PiedDroit! I am still studying the manual! :) It's great progress that now I manage not to freeze the sim when running the profile!! Edited January 29, 2016 by Swaty [sIGPIC][/sIGPIC] My Pit
PiedDroit Posted January 30, 2016 Posted January 30, 2016 Don't hesitate to ask for advice, most advanced functions can be achieved in an elegant way, when you know what to use :thumbup:
Recommended Posts