Page 1 of 1

lmc_fs_event() How does it wotks?

Posted: 29 Jan 2021, 17:34
by jonny
When I use it in LUA-script for fs2020 it only take one step each time.
I use lmc_fs_event('HEADING_BUG_DEC') and lmc_fs_event('AP_ALT_VAR_DEC') and for every key press, it is only one step up or down.
When i use keyboard key direct via FS2020, heading bug decrease as long as I press the key. And same for AP ALT VAR DEC and of course same for other similar keys.
Is there some more parameters to lmc_fs_event() or is there other hits to use?

Re: lmc_fs_event() How does it wotks?

Posted: 01 Feb 2021, 09:29
by admin
In this scenario luamacros just calls SimConnect event, so it's more question to be answered in FSXX SDK.
You may try to check if there's another event to make bigger step or if there's some parameter.

In luamacros you receive call for key down and for key up - eventually more key downs if your keyboard driver calls repeated key downs when holding the key. So you would even need some "start increasing" even to SimConnect (and I don't think is has one) or you would need to do some "advanced scripting" with timers. Your key down press would start timer sending event e.g. every 500ms and key up would stop it. That could maybe work...