plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

We prepared 3 new YouTube tutorials about Audio! They are available here.
You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!


question

MV-JimStewart avatar image
MV-JimStewart asked FlyingRaccoon answered

Request for more Interaction/Input Event tutorials

So, the current tutorial in the docs that covers adding interactions with input events is a good start, but it's rather incomplete. For example, it doesn't address the fifth Interaction_Type (joystick), and it lacks a fair bit of clarity on what options are allowed for customizing each type of interaction. This leaves one to search through files on your own, looking for parameters that can be set, and experimenting from there - which is not a great use of development time.

To be more specific: I'm trying to determine the method (via the interactions/input events) to have a proper 3 position momentary switch, where the switch can be held in a specific state to have a value increase or decrease continuously as long as the switch is held.

One can do this easily via direct use of the GT Switch templates such as ASOBO_GT_Switch_XStates, but this method seems to go against the current direction towards the use of input events. In addition, I was hoping to take advantage of nested input events, so that I could allow the user the convenience of a 'reset trim' option on a trim switch, for example.

I have found in various input event examples 3 state 'momentary' switches that allow the user to put a switch in one state but not hold in that state... the sim 'forces' the switch to the middle state after a short length of time. This does not work nicely for a trim switch where the user is expected to hold the switch for a length of time to achieve a desired value.

defaultdocumentationgaugestutorial
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
FlyingRaccoon avatar image
FlyingRaccoon answered

Hello @MV-JimStewart

That's right, the joystick interaction type was added recently but not yet in the doc. Our tech writer will fix this.

The doc doesn't go very deep into the parameters because there are a lot of those in the subtemplates and it's changing a lot so the would quickly become obsolete.
We are focusing on higher lever doc at the moment and browsing the template files is the only way to understand how it works.
But we want to improve this as well, either with better tools or doc if we end up having enough resources for it.

As for the trim switch you're trying to implement, look for ASOBO_HANDLING_Switch_ElevatorTrim_Template, it already has that logic implemented.
If you want to create your own, you can have an InputEvent with a 3 states switch, you just need do use the MONOMENTARY_SWITCH, STATE0_TIMER and STATE_MAX_TIMER

Regards,
Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.