Jump to content
The simFlight Network Forums

Question: Delay between single button events possible?


Recommended Posts

Hi there,

I want to do this:
- switch on joystick goes on -> pulse state 1 to control (once), wait 2 seconds, pulse state 2 to control (once)
- switch on joystick goes off -> pulse state 0 to control

My problem is "wait 2 seconds". Is there any solution for this?

Here the relevant part of my INI file:
[Buttons.PMDG 747]
0=R1,19,C69645,1 -{Custom control: <69645>}-
1=R1,19,C69645,2 -{Custom control: <69645>}-
2=U1,19,C69645,0 -{Custom control: <69645>}-

Thanks in advance / Best regards, Ralph

Edited by Ralph_E
Link to comment
Share on other sites

1 hour ago, Ralph_E said:

I want to do this:
- switch on joystick goes on -> pulse state 1 to control (once), wait 2 seconds, pulse state 2 to control (once)
- switch on joystick goes off -> pulse state 0 to control

My problem is "wait 2 seconds". Is there any solution for this?

You'd need to use a small Lua plug-in to do it, assigned just to the ON  event. So you'd only have two lines in the assignments, both facilitated in the Options (no need for INI editing operations),

The Lua script would simply send the control (ipc.control function) then sleep(2000) then send the control again. Three lines of script, that's all.

Pete

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.