Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I have a LUA function that listens for parameter changes using event.param(functionName). My understanding is that if I send the same parameter over and over again the function will not trigger, since the param value hasn't changed. Right now I'm setting the parameter to zero in my button release and treating a zero as a NOOP, but I'm curious whether the function itself can modify the parameter value. The documentation doesn't seem clear, or my brain is too small. 😄

Cheers!

 

Posted

Luke,
It seems you would like one particular button to call a function w/ repeat.
An option is to use event.flag(flag #, function name) in the lua, then in the button assignment, use LuaToggle <lua name>  with a param of the flag#, repeat on. 
When passed to the function, the flag number gets sent too, perhaps can be used similar to the param being sent using event.param.

I use flags / LuaToggle a lot when multiple user interfaces need to use the same function in some fashion - very handy.

Roman

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.