Jump to content

Recommended Posts

Posted

Is it possible to lower the output without touching the set keyboard rate?

So putting some delay between each output. There are various uses of delay functions in script but not the one i'm after.

If i press a key on the keyboard, the sequence is like this:

 

 

aaaaaaaaaa

 

 

But i would like a delay between each output of the character like this:

 

 

a a a a a a a

 

 

There are a few functions to put in delays but they all seem to work with a fixed set of outputs and are always used for outputting various keystrokes.

I just need a delay between each output of the same character for as long as i keep the button pressed.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted

It isn't the simple solution you are probably looking for, but this is how you do it:

 

MapKey(&Joystick, S3, REXEC(1, 500, "ActKey(PULSE+KEYON+'a');") );

 

This will repeat the a key every 500ms and it will do it only for as long as you have the APENG button pressed.

 

Other notes.... (for full clarity)

 

Make sure the REXEC has a different handle for each instance you create. I mean, the REXEC(1, ...), that 1 should be different for each REXEC you use in your script.

 

Because this is an REXEC (same for EXEC), you must use Actkey() to press a key. PULSE means the key will be pressed and released for the default time (25ms). KEYON is needed to press the 'a'. The 'a' is released automatically.

 

If you did the above and added RNOSTOP as follows...

 

MapKey (&Joystick, S3, REXEC(1, 500, "ActKey(PULSE+KEYON+'a');", RNOSTOP) );

 

... then the A key would be pressed every 500ms continuously regardless of releasing the S3 button. It will continue until you issue a StopAutoRepeat command as follows...

 

MapKey(&Joystick, S4, EXEC("StopAutoRepeat(1);") );

 

...where the 1 would be replaced with the handle number of the REXEC you want to stop.

Posted (edited)

Hey Drakoz, thanks for the solution, works nicely.

Basic idea was to have a bit more control on the opening the speedbrake on the F-16.

Therefore i did need some delay on the output, tried different stuff but none of them worked.

This doesn't work for the closing of the speedbrake since that's an all or nothing event.

 

Learning every day: yesterday i had a syntax error 0x00010000 on compiling, no error code list to point me a bit in the right direction so i searched for over a good 2 hours to find that a minus sign in a macro was the culprit.

Edited by Lange_666

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted

Does the F-16 speed brake have a mappable axis in DCS? If so, you can also map a button to control a DirectX axis. That may give full control out and back in.

Posted

No it doesn't...

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted

This output delay is a nice workaround.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

  • 2 weeks later...
Posted

For the Speed Brake I use this:

//Speed Brake *************************
MapKey(&Throttle[color=#ffffff],[/color]SPDF, SPD_BRK_Switch_Fwd_RETRACT);
MapKeyR(&Throttle[color=#ffffff],[/color]SPDF, SPD_BRK_Switch_OFF);
MapKeyR(&Throttle[color=#ffffff],[/color]SPDB, SPD_BRK_Switch_OFF);
MapKey(&Throttle[color=#ffffff],[/color]SPDB, SPD_BRK_Switch_Aft_EXTEND_Momentary);

I get full control over the brake in or out.

Night Ops in the Harrier

IYAOYAS


 
  • Recently Browsing   0 members

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