• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Changing visual model from client - Newbie Alert!

Messages
112
Country
unitedkingdom
Hi folks.

Not sure if this is the right section to post this but I'm sure someone will correct me if not.
I'm creating a client application that I want to use to initiate ground service tasks to my user aircraft. Starting simply, I'd just like to open an access panel for now.

Whilst this is a first for me, I have managed to install the SDK correctly, programmatically open a connection via SimConnect, modify and load a .flt file, define some data, map some client events - and do stuff like get the aircraft position and set COMM frequencies with reasonable success.

I've got me a copy of FSDS to do some learning on (I'm reasonably proficient with AutoCAD) and have skimmed through the tutorials about creating named parts, managing to assemble and compile the simple sample aircraft into FSXA.

So now I would like to click a button in my client application and, say, have the HYD1 service panel (of the aircraft I haven't yet created) pop open.

Where do I go next?

Many thanks in advance,

Z
 
You could set up a custom animation in the modeldef.XML file (using a custom variable), and assign that animation to the door. Then your client needs to trigger that custom animation by changing the value of that variable (which you sense in the XML file). The modeldef.XML file is found in your SDK/Environment Kit/Modeling SDK/bin folder.
 
Thanks Tom.
Liking the sound of this. The custom variable is something I can define and set via SimConnect, right - like a predefined one? Just to anticipate future requirements, can I create arrays using custom variables? I'm thinking of perhaps defining all the access panels in one go.
The other thing on my mind is how best to deal with items that could be transferred from a trolley to the aircraft - let's say a drop tank but there are countless other examples. I'd like to avoid the binary "now you see it - now you don't" approach if possible, but am wondering how this might be implemented. How feasible is it to have a sequence something like this:
1) in response to a trigger my client code, use something like SODE(?) to send my trolley object to a location relative to the aircraft's position and orientation.
2) Start an animation on the trolley object to move the tank into position. (That description sounds a bit too "telekinetic" at the mo but we'll see)
3) When the trolley payload is in position then hide it and simultaneously trigger the display a hidden part on the aircraft model.

Maybe I'm getting ahead of myself. (Small steps have served me well in the past!) I just find that knowing where you are going sometimes makes the journey more palatable. :D

Cheers,
Z
 
Actually it's declared in modeldef.xml and thereon .mdl file.

You'll want to use an L:variable and use panel (gauge) system then to update it.
regarding trolley, probably simpler to make it a part of the aircraft model I think
 
Yes, the L: variable. Then it's controlled by a panel gauge (or by SimConnect? - don't know).
 
Then it can be controlled in a variety of ways, mouserectangle in Virtual Cockpit (modeldef.xml - XML code), gauge system (XML, C or C++ code), limited options also from SimConnect.
 
Thanks both. I guess I need to do some actual work now and report back when I get stuck.
 
Back
Top