Jump to content

Recommended Posts

Posted (edited)

Greetings,

 

Im trying to set h4u to dx28 if psb with the following...yet it's not working. Any ideas?

 

MapKey(&Throttle,PSB,EXEC("MapKey(&Joystick,H4U,DX28);"));

Edited by dtdionne
Posted (edited)

What?

If PSB, then H4U will produce DX28, is that what you want?

Post your script, I'll try to fix it. Look at the layers section in the book.

You need to declare what your In, Out, Up, Middle, Down, buttons are.

SetShiftButton(&Joystick, [b]S4[/b], &Throttle, [b]PSF[/b], [b]PSB[/b]);  //Assigns the pinky Lever on the stick (S4) as momentary In/Out Layer.
Assigns PSF as UP layer and PSB as DOWN Layer

Then you write your MapKey function call like this:

 

MapKeyIOUMD(&Throttle,H4U,
                          0,                    //IN Layer          Use zero for no action.  
                          0,                    //OUT Layer        
                          0,                    //UP Layer
                          0,                    //MIDDLE Layer
                          [b]DX28[/b],             //DOWN Layer
                           [b]UD[/b]TOGGLE);    //Sets UP and DOWN layers to TOGGLE

Check out the section on "Layers" in the TARGET Script Editor. Post you script If you still need help.

Good luck.

Edited by SGT Coyle

Night Ops in the Harrier

IYAOYAS


 
Posted

Thank you so much, that helped.

 

What I was tripping over was page 38's assertion that EXEC had a mini-layer or dynamic key mapping capabilities. The example they gave seemed to indicate that you could code on the fly state sampled key layering. I read this to mean an alternative to IOUMD. In essence, that any switch "state" could be used, surgically, as a layer.

 

This is the example they gave...I just tried to adapt it, unsuccessfully

 

MapKey(&Throttle, APPAT, EXEC("MapKey(&Throttle, APENG, L_ALT+'6');"));
MapKey(&Throttle, APAH, EXEC("MapKey(&Throttle, APENG, L_ALT+'2');"));
MapKey(&Throttle, APALT, EXEC("MapKey(&Throttle, APENG, L_ALT+'4');")); 

 

Anyway, I'm using Aussiedroids outstanding Elite Dangerous target script which already had shifts setup, so i just added

 

//David Start 

MapKeyUMD(&Joystick,H4U,
                          DX15,                    //UP Layer
                          DX15,                    //MIDDLE Layer
                          DX28             //DOWN Layer
                           );
MapKeyUMD(&Joystick,H4D,
                          DX17,                    //UP Layer
                          DX17,                    //MIDDLE Layer
                          DX30             //DOWN Layer
                           );
                           
//David Stop 

 

Works GREAT, THANK YOU!

Posted

dtdionne,

What was it in your OP that wasn't working? It worked for me. I assumed it was the MapKey function, but looking at the example on pg 38, it seems logical. I never used MapKey in an exec. I don't think.

Night Ops in the Harrier

IYAOYAS


 
  • Recently Browsing   0 members

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