Jump to content

Problem with T.a.r.g.e.t layers in a-10c


bezzi
 Share

Recommended Posts

So i have created layer (U layer switch) using 3-way pinky switch forward position, problem is that any of the controls binded to U layer will disable M layer (default) controls. Is there way to fix this or are layers just useless?

Link to comment
Share on other sites

If you post your code, or PM it to me, I can take a look later today. Without seeing it, I would not even want to guess.

 

Layers work just fine if coded correctly.

 

EDIT: Please be aware that I am not an expert but I have been using it for a while.

 

Welcome to the forum, btw. :)


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:

Link to comment
Share on other sites

If you post your code, or PM it to me, I can take a look later today. Without seeing it, I would not even want to guess.

 

Layers work just fine if coded correctly.

 

EDIT: Please be aware that I am not an expert but I have been using it for a while.

 

Welcome to the forum, btw. :)

 

Thanks for offering the help, before i start posting code need to ask one question. Does the M layer recognize default controls automatically or i need bind them again? It works fine if i bind all the "default" controls to M layer, but its going to take while if need to do it like this.

Link to comment
Share on other sites

You should not need to do that, AFAIK. Let me see if I can find evidence one way or the other.

 

EDIT: The Flaming Cliffs 2 profiles that come with Target use both MapKeyUMD and MapKeyIO along with the default MapKey. It has been a while but I do recall playing with those scripts and they did work.


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:

Link to comment
Share on other sites

You should not need to do that, AFAIK. Let me see if I can find evidence one way or the other.

 

EDIT: The Flaming Cliffs 2 profiles that come with Target use both MapKeyUMD and MapKeyIO along with the default MapKey. It has been a while but I do recall playing with those scripts and they did work.

 

Ok here is some code, 2 binds in U layer (pinky switch forward) for zoom in/out using the Mic switch button

include "target.tmh"
int main()
{
Configure(&HCougar, MODE_EXCLUDED);
Configure(&T16000, MODE_EXCLUDED);
Configure(&LMFD, MODE_EXCLUDED);
Configure(&RMFD, MODE_EXCLUDED);
if(Init(&EventHandle)) return 1;
SetKBRate(32, 50);
SetKBLayout(KB_ENG);
SetShiftButton(&Joystick, S3, &Throttle, PSF, PSB, 0);
MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Joystick, JOYX, 0, 0, 0, 0, 0);
MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Joystick, JOYY, 0, 0, 0, 0, 0);
MapKeyIOUMD(&Throttle, MSR, USB[85], USB[85], 0, 0, 0, 0);
MapKeyIOUMD(&Throttle, MSL, USB[84], USB[84], 0, 0, 0, 0);
MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0);
MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_RIGHT, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_FC, 0, 0, 0, 0, 0);

}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}


Edited by bezzi
Link to comment
Share on other sites

OK, it will probably be late tonight (my time) before I have a chance to play with it in target and the sim.

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:

Link to comment
Share on other sites

I could not find a problem. Unless I am misunderstanding what you are trying to do.

 

I took your code and added a line to make the trigger turn on/off the controls indicator regardless which layer was active. I did not test it in game, did not see much point, though I can if you wish. The attached picture shows what keystrokes were being generated. Note the end where the trigger is pulled right after the zoom commands. That was done with the pinkie switch forward. The entries prior to that were with the pinkie switch in middle and back positions. In all cases the Trigger kept working.

 

targettest_zps6fc8ce6a.jpg


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:

Link to comment
Share on other sites

Using the scripts/layer configuration makes controller to Virtual game controller, so if you try to example bind any buttons in game (DCS a-10c) by default it doesn't recognize any of them. So basically when using scripts/layers, you need to script all of the buttons to press keyboard shortcuts which are binded in game.


Edited by bezzi
Link to comment
Share on other sites

Using the scripts/layer configuration makes controller to Virtual game controller, so if you try to example bind any buttons in game (DCS a-10c) by default it doesn't recognize any of them. So basically when using scripts/layers, you need to script all of the buttons to press keyboard shortcuts which are binded in game.

 

Ah, I see what you mean now. AFAIK, you are essentially correct. I use some in game assignments for some sims. In those cases I do code each switch that I want to assign in game with a DX function.

 

MapKey(&Joystick, TG1, DX1);

 

Then I just assign it in game while the profile is running.

 

EDIT: My apologies for running off in the wrong direction.

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:

Link to comment
Share on other sites

Trying to bind now some DX function keys in game. Example now my toggle flaps is using DX function, but in game controls it can't be assigned because some of the virtual controls are locked out (blue backround)? So it seems there is lots of problems when trying reassign most of controls.

Link to comment
Share on other sites

OK, now that I know what you are doing there are a few issues with getting it to work correctly. The basic problem is that DCS A-10 has a standard default joystick lua and it also has a specific one for the Warthog. The situation is the same for the throttle except that it makes a really big difference.

 

The commands that you need only exist in the Warthog default throttle lua. To get everything mapped like the Plug-n-Play you have to edit/create your own Thrustmaster Combined lua file with the missing functions. The flaps and throttle idle detent functions are among the problem areas.

 

I edited one a long time ago, it only contains the functions that I use for my profile.

 

Here is my TM Combined lua, this should give an idea how to get where you want to go. Ask if you have more questions, as I have never tried to explain this to anyone before.

A-10C TMcombined.zip

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:

Link to comment
Share on other sites

Thanks again for the help. i have been learning a lot about the controls and the game too. I will start testing lua-files in couple days and hopefully get good setup next week when my pedals arrive.

Link to comment
Share on other sites

You're welcome. I certainly don't know everything but feel free to ask if you have questions.

 

Happy flying!!

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:

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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