Jump to content
The simFlight Network Forums

Recommended Posts

Posted

How do I hook one of the InputEvents as displayed by the Log->List Input Events menu item ??

None of the event.XXXXX functions in the lua library would seem to apply or am I missing something (probably)

Plus I cant find any definition anywhere of "AUTOPILOT_FLC_Button" as displayed in that list

thanks

 

Posted
35 minutes ago, drave said:

How do I hook one of the InputEvents as displayed by the Log->List Input Events menu item ??

What do you mean by 'hook' in this context? You assign to input events as you would any other event type, but by checking 'Select for Input Event' (but not for axes due to calibaration issues)..

36 minutes ago, drave said:

None of the event.XXXXX functions in the lua library would seem to apply or am I missing something (probably)

Ah, no - there is no event handling function for Input Events. You can add the input event to an FSUIPC offset (via the ini file) and use the event.offset function. See the Advanced User guide on adding Input Events to offsets - basically works in the same way as adding lvars to offsets, but using a different ini section.

I will look into adding an event.InputEvent lua function in a fuuture release.

John

Posted
10 minutes ago, John Dowson said:

What do you mean by 'hook' in this context? You assign to input events as you would any other event type, but by checking 'Select for Input Event' (but not for axes due to calibaration issues)..

Ah, no - there is no event handling function for Input Events. You can add the input event to an FSUIPC offset (via the ini file) and use the event.offset function. See the Advanced User guide on adding Input Events to offsets - basically works in the same way as adding lvars to offsets, but using a different ini section.

I will look into adding an event.InputEvent lua function in a fuuture release.

John

 

Hook as in - Run some of my code when this event happens. 

I'll have to look into using the event.offset method 

thanks

dave

 

Posted

Just another quick question

What can the events shown by Log->List Input Events be used for ??

thanks

 

Posted

It shows the input events that can be used for assignments, to buttons/switches & key presses natively, or via lua for axes. The same as listing available lvars (via Add-Ons->WASM->List lvats).

You can also log lnput event value changes by setting Log->Input Events. This is needed to determine the values (discrete or ramge) that the input event accepts and how they relate to the function (e.g. the value for each position in a switch).

 

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.