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

MSFS24 Animation Trigger

Messages
25
Country
spain
Hello, I need a little help finding why the expressions I'm putting in won't work to trigger the animation. I made an animated hangar door and placed this trigger to activate it: <ANIM_CODE>(L:LIGHTING_TAXI_1,Bool) 1 == if{ 100 } els{ 0 }</ANIM_CODE> on the XML file, and it works. The issue I have is that it only works with certain planes that have that exact expression. If it doesn't have it, then the animation won't trigger. What I want to do is put an expression that all airplanes have. I was thinking of a transponder code or a radio frequency. I tried hiding the yoke, but it turns out there are more than one expression that hides the yoke. Another thing that's happening is that MSFS 2024 gives variable types that I've never seen before, like (L:LIGHTING_TAXI_1,Bool) 1 == if{ 100 } els{ 0 }. When I test it with SpadNext, This one uses a "B" instead of the "L" variable type But if I put the "B" variable type at the beginning of the expression, like (B:LIGHTING_TAXI_1,Bool), it won't work, so I don't know why this is happening.
 
Last edited:
L:vars and E:vars are the only one that are shared among all the game
That's why the hangar (a scenery Simobject) can use them


But as you have already noticed, the L:var are custom variables, it the creator of the aircraft you are flying hasn't used them in its plane, you have no way to trigger them from that plane, unless you mod that plane

Xpdr and Freq are only available to the


A universal solution must be custom created, either via an external Simconnect application, a efb application, wasm or in-game panel
 
Hello mamu, thanks for your answer, I am actually suscribed to your discord server, and thanks to your tutorials I've learning a lot on animations. so then non of the A variables would trigger the doors? I saw one of your videos some time ago where hangar doors open as you pass near them, in that video you said you were going to make a tutorial on how to acomplish that, Did you made that tutorial? I guess you use some kind of proximity or area trigger right? back in the day I did some missions for FSX and P3D where these are used so I kind of know how they work, my question is how do you apply them to a scenery sim object?
 
Hello mamu, thanks for your answer, I am actually suscribed to your discord server, and thanks to your tutorials I've learning a lot on animations. so then non of the A variables would trigger the doors? I saw one of your videos some time ago where hangar doors open as you pass near them, in that video you said you were going to make a tutorial on how to acomplish that, Did you made that tutorial? I guess you use some kind of proximity or area trigger right? back in the day I did some missions for FSX and P3D where these are used so I kind of know how they work, my question is how do you apply them to a scenery sim object?
I'm a bit lazy with tutorials lately

About the proximity trigger (and the whole scripting thing) the p3d/fsx documentation is way more informative than the msfs, and there are pretty much no changes
You can find my sample for the proximity trigger here, with all the comments in the XML it shouldn't be difficult to replicate

Post in thread 'Triggering Hangar door animation in SimObject by distance?' https://www.fsdeveloper.com/forum/t...n-in-simobject-by-distance.451392/post-913422
 
I have an animated gate in my EFTP scenery between the GA parking and the rest of the airport. It opens/closes using a proximity trigger and works fine for most airplanes but there is at least one that does not open the gate at all. That is the Cessna 208B in MSFS2024. It clearly has something to do with the plane as the gate works perfectly with most other planes. Any idea what the reason for this behavior could be?

Edit: Did some more testing and found that the problem exists only with the amphibian version of the C208B - the other versions do open the gate!
Edit2: I tried with some other amphibian planes and they all trigger the gate. So problem only with the C208B Amphibian.
 
Last edited:
Hello, I need a little help finding why the expressions I'm putting in won't work to trigger the animation. I made an animated hangar door and placed this trigger to activate it: <ANIM_CODE>(L:LIGHTING_TAXI_1,Bool) 1 == if{ 100 } els{ 0 }</ANIM_CODE> on the XML file, and it works. The issue I have is that it only works with certain planes that have that exact expression. If it doesn't have it, then the animation won't trigger. What I want to do is put an expression that all airplanes have. I was thinking of a transponder code or a radio frequency. I tried hiding the yoke, but it turns out there are more than one expression that hides the yoke. Another thing that's happening is that MSFS 2024 gives variable types that I've never seen before, like (L:LIGHTING_TAXI_1,Bool) 1 == if{ 100 } els{ 0 }. When I test it with SpadNext, This one uses a "B" instead of the "L" variable type But if I put the "B" variable type at the beginning of the expression, like (B:LIGHTING_TAXI_1,Bool), it won't work, so I don't know why this is happening.
just some fyi on variables
your using a Local Variable (L:<somevariable>), this may be why it only works on some aircraft

B: vars im not 100% certain about tbh, I think its used in wasm c++ stuff

the 3 main ones used directly in the game that I know of are

L: vars- Local Variables the aircraft developer creates and uses per aircraft (they are globally seen but may not be consistent from aircraft to aircraft)
A: vars- these are the regular Sim Variables used to read data 'mostly' though some can be writable
K: vars- these are Key Events used to write too sim variables and other systems in the game

I think mamu's suggestion would be a lot better (no user interaction needed)
but for your example i 'think' you would want a K: var there (im not a programmer, im just guessing here)
like maybe LANDING_LIGHTS_SET or LANDING_LIGHTS_TOGGLE with the index
 
Coincidentally I am currently working on this issue. The plan is a small WASM module which "reads" certain SimVars and sets custom L;Vars accordingly. Hopefully then the WASM can be packaged with the scenery it supports and the triggering will happen when the appropriate SIM:Var state is achieved. Imagine a marshaller standing waiting for you to taxi; you make a switch in the cokpit which sets a SimVar, and the module responds to that and sets a LVar which in turn triggers the marshaller into action. I am at an early stage but have proved the ability of an LVar to trigger an animation. I do plan to publish the code on here if/when it is working.
 
iI believe that the problem with the amphibian C208B is different as it isn't based on variables but on proximity. But haven't found out what could be causing it and how to fix it for that particular plane.
 
iI believe that the problem with the amphibian C208B is different as it isn't based on variables but on proximity. But haven't found out what could be causing it and how to fix it for that particular plane.
What is the depth of your detection box - I think that is Y in the co-ordinates, not Z? Could it be that shallow box does not detect the amphibian with wheels down for land ops but the sim sees the floats as the bottom of the model? Just a wild flying guess on my part.
 
The box is 80 m long (40 m in each direction from the gate), 15 m wide (the gate is 17 m) and 3 m deep so it should be deep enough. Maybe I should test with an even deeper box...

EDIT: Yes, indeed! I changed the depth to 6m and that fixed it. Now the gate is triggered also by the amphibian 208B! Thanks, @SPerx !
 
Last edited:
The box is 80 m long (40 m in each direction from the gate), 15 m wide (the gate is 17 m) and 3 m deep so it should be deep enough. Maybe I should test with an even deeper box...

EDIT: Yes, indeed! I changed the depth to 6m and that fixed it. Now the gate is triggered also by the amphibian 208B! Thanks, @SPerx !
Great - a successful wild flying guess!
 
Back
Top