• 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.

Cockpit Animation Problem

Messages
13
Country
us-virginia
Hello all, I am having an issue with certain cockpit animations. I have researched this forum and some other threads but no real answer up to this point.

As I build an aircraft package and load it in the sim, approximately 50% of the time some of the cockpit animations do not work. These include lighting knobs, one of the two throttles, gear handle, and a few other items.

However, if I reload the sim by switching back to the main menu and reloading the flight, it all works perfectly. I am not sure what the issue could be.

Has anyone else had this issue? Is there a known solution or suggestion?
 
Yes I have sporadic functionality of an instrument I created. This is easily attributable to the fact that I do not know MSFS Template code intrinsically and instead throw code at the wall to see what sticks. The sporadic throttle suggests you have mirrored parts from the working version in a way that conflicts and I'd start with that.

I recently encountered a similar issue with a set of rudder pedals of which one pedal set would flip 180 degrees opposed, but only in the sim, not in 3ds Max. Resetting transforms X-forms, setting new helper nodes had no effect. Finally I went back to the original source model and through trial and error of breaking each part off, resetting it's transform, resetting its origin, I was able to get both pedal sets to work correctly. I'd never mirrored anything originally, we're allowed to mirror the helpers before they're animated, but all the parts I'd broken off the first time were aligned to the common origin of the pedals model, which itself wasn't in the middle of that mesh, it probably represented the center of the cockpit or something.

So if you get back to your original source throttle before animation, you can check your transforms and make sure to not mirror keyframes.
 
rk,
Thank you very much for the suggestion. I will see if that will help.

The reason I do not think it's an blender animation issue is because a simple reload makes all the animations work instantly and they continue to work fine. I just don't know if it's something in my code or something with the sim.
 
Try to imagine this situation from the point of view of someone that knows absolutely nothing about your technique or procedure that is only just now learning you use Blender. You've confirmed version/exporter matches?
 
What is your workflow like?

How are you building your package? Is it in game with the project loaded in the editor or are you using fspackagetool externally?

Why are you rebuilding your package?

There's only 3 reasons I would need to rebuild the package:

1. Changes to any of the model files.
2. Changes to any textures.
3. Adding new files to the folder structure.

If I need to make changes to any of .cfg files, html files, or behaviors files (XML) then I would do those in a text editor, save the changes and use the Quick Reload function in Tools - Behaviors. I have found it to be the most reliable method to make common changes to those files (except if you are editing Checklists, that's quite unreliable and can often need an exit to the main menu and restart of the flight). Of course, that is all done without actually loading the project in MSFS. With a project loaded the Quick Reload function does not work.
 
What is your workflow like?

How are you building your package? Is it in game with the project loaded in the editor or are you using fspackagetool externally?

Why are you rebuilding your package?

There's only 3 reasons I would need to rebuild the package:

1. Changes to any of the model files.
2. Changes to any textures.
3. Adding new files to the folder structure.

If I need to make changes to any of .cfg files, html files, or behaviors files (XML) then I would do those in a text editor, save the changes and use the Quick Reload function in Tools - Behaviors. I have found it to be the most reliable method to make common changes to those files (except if you are editing Checklists, that's quite unreliable and can often need an exit to the main menu and restart of the flight). Of course, that is all done without actually loading the project in MSFS. With a project loaded the Quick Reload function does not work.

Anthony, I am not having to rebuild package, simply reloading them to get all the animations to work.

Package is already built - 100% of the animations work on the external model.
Some of the animations do not work in the cockpit; however, they work immediately if I (1) End Flight and (2) Restart Flight.


That is why I do not think it's an issue with animation or code because if that was a problem, the animations would not work at all.
 
I'm still not sure of your work process. In your original post you say "As I build an aircraft package and load it in the sim, approximately 50% of the time some of the cockpit animations do not work."

Now you are saying that you don't rebuild the package, simply reloading them.

I'm still not sure of what steps you are doing. How are you reloading the aircraft?

It makes it very difficult for anyone to give you any advice when they are unsure of exactly what steps you are currently taking.

For example, what do you mean by "the animations do not work"? You mention earlier that one of the two throttles do not work. Does the second throttle not move at all? Does the working throttle move while the second throttle doesn't? What about the mouse zones? Does putting the mouse over the non-working throttle changes the mouse icon? This kind of information helps to know what parts of your code are being read by the sim and what isn't.

Perhaps you would like to post the code for your throttles? There may be something in the way you've written the code for the second throttle that is the cause of the problem.

As to your original question, no, I've not had this problem where some parts work and some don't. I've posted earlier about how I make changes to animation code and reload it into the sim and I've found that method to very reliably reload most changes to .cfg and .xml files (except as I mentioned checklist files)
 
I'm still not sure of your work process. In your original post you say "As I build an aircraft package and load it in the sim, approximately 50% of the time some of the cockpit animations do not work."

Now you are saying that you don't rebuild the package, simply reloading them.

I'm still not sure of what steps you are doing. How are you reloading the aircraft?

It makes it very difficult for anyone to give you any advice when they are unsure of exactly what steps you are currently taking.

For example, what do you mean by "the animations do not work"? You mention earlier that one of the two throttles do not work. Does the second throttle not move at all? Does the working throttle move while the second throttle doesn't? What about the mouse zones? Does putting the mouse over the non-working throttle changes the mouse icon? This kind of information helps to know what parts of your code are being read by the sim and what isn't.

Perhaps you would like to post the code for your throttles? There may be something in the way you've written the code for the second throttle that is the cause of the problem.

As to your original question, no, I've not had this problem where some parts work and some don't. I've posted earlier about how I make changes to animation code and reload it into the sim and I've found that method to very reliably reload most changes to .cfg and .xml files (except as I mentioned checklist files)
Anthony,
Hopefully this explains what I mean.

 
Hi Venom,

I had this behavior in the past at times. Usually it was caused because I tried to program anything related to variables in code. You try to set up some variables before the flight but they don’t get picked up at first because for instance you try to set it up twice (only the last gets picked up.. or does it?). Then in runtime code (within an ASOBO_GT_Update or ASOBO_GT_Anim_Code) you change this variable again. Now something does get setup but not used because of your function using the same but different variable. Now at reset the sim remembers some of these variables and goes into a different (the correct) function.

The way I error check this is to declare an empty variable with different names (1 (>L:Variable_Test1) for instance) in different Templates or Components to see which one gets picked up. You can see this in the behavior tab. Type in the filter Test in this case to see it quickly. If one does not show up this is suspicious.

The other tabs (like input events) can be really useful to see errors. I did not use it at first and tried to find it in code but nowadays it’s one of the first thing I look at. Saves a lot of time. A bit of a learning curve but pays back quickly.

The first thing I would do is look if you try to set up the same variable multiple times in different components or templates.

good luck.. I have been there :-(

Cheers Arie
 
Hi Venom,

I had this behavior in the past at times. Usually it was caused because I tried to program anything related to variables in code. You try to set up some variables before the flight but they don’t get picked up at first because for instance you try to set it up twice (only the last gets picked up.. or does it?). Then in runtime code (within an ASOBO_GT_Update or ASOBO_GT_Anim_Code) you change this variable again. Now something does get setup but not used because of your function using the same but different variable. Now at reset the sim remembers some of these variables and goes into a different (the correct) function.

The way I error check this is to declare an empty variable with different names (1 (>L:Variable_Test1) for instance) in different Templates or Components to see which one gets picked up. You can see this in the behavior tab. Type in the filter Test in this case to see it quickly. If one does not show up this is suspicious.

The other tabs (like input events) can be really useful to see errors. I did not use it at first and tried to find it in code but nowadays it’s one of the first thing I look at. Saves a lot of time. A bit of a learning curve but pays back quickly.

The first thing I would do is look if you try to set up the same variable multiple times in different components or templates.

good luck.. I have been there :-(

Cheers Arie
Arie, good day and thank you very much for the detailed response. I am definitely going to try that and hopefully find a fix. The other thing I was considering is custom code. Right now there are 50+ animations inside the cockpit and essentially 7-8 do not work unless I restart the sim session. All of the animations assigned custom codes work perfectly fine. The issue I am having is with ASOBO_GT_ANIM or ASOBO_GT_ANIM_CODE ... I was going to convert the 7-8 problematic animations to custom code.

Thanks once again for your recommendation; it's very helpful and I will try it out this weekend.

Have a good one.
 
Back
Top