lmc_fs_event() How does it wotks?

Documentation. First post is always kind of manual page, being continuously updated by author. Following posts are discussion about the topic.
Post Reply
Posts: 16
Joined: 22 Aug 2012, 19:35

lmc_fs_event() How does it wotks?

Post by jonny » 29 Jan 2021, 17:34

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?

Site Admin
Posts: 703
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic

Re: lmc_fs_event() How does it wotks?

Post by admin » 01 Feb 2021, 09:29

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...
Petr Medek
LUAmacros author

Post Reply