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

Multiple Animation tags to same part?

Messages
180
Country
panama
Hello,

I'm trying to create a model with parts that I would them to have multiple animation tags assigned to a singe part. Is that possible?

Thanks,

Manuel
 
No, it's not. You need to create a custom animation if you want to have it driven by multiple inputs.
 
You can create a hierarchy tree of animations.

For example, with a joystick you need 2 animations. One to move the stick left and right and another to move front and back.

You would create a small part (a triangle is all that is needed) that is placed within the stick somewhere and therefore hidden and assign it to the left and right animation. For the stick you would then make it a child of the left and right part and animate the stick front and back. As the left and right part animates the front and back part will move left and right. The front and back animation is a child of the left and right animation or you can say the left and right animation is the parent of the front and back animation.
 
Thanks Heretic, Anthony and Paul by your replies

What if let's say, I have a skinned mesh animation and I have a single timeline with multiple actions during that animation, and I would like to assign different animation tags to the same bones, but at different animation segments during that long animation sequence.

Let's say:

My animation's length is 100 keyframes

1- Action #1 - from keyframe 0 - 10, I would like here to select all bones and tag them to let's say ANIMATION TAG 'Ambient'
2- Action #2 - from keyframe 11 - 21, I select ALL same bones and tag them ANIMATION TAG 'c_tire_still_key'
3- Action #3 - from keyframe 21 - 31, I select ALL same bones and tag them ANIMATION TAG 'l_tire_still_key'
4- And so on...until reach keyframe 100

Is this possible?

Thanks

Manuel
 
Thanks Heretic, Anthony and Paul by your replies

What if let's say, I have a skinned mesh animation and I have a single timeline with multiple actions during that animation, and I would like to assign different animation tags to the same bones, but at different animation segments during that long animation sequence.

Let's say:

My animation's length is 100 keyframes

1- Action #1 - from keyframe 0 - 10, I would like here to select all bones and tag them to let's say ANIMATION TAG 'Ambient'
2- Action #2 - from keyframe 11 - 21, I select ALL same bones and tag them ANIMATION TAG 'c_tire_still_key'
3- Action #3 - from keyframe 21 - 31, I select ALL same bones and tag them ANIMATION TAG 'l_tire_still_key'
4- And so on...until reach keyframe 100

Is this possible?

Thanks

Manuel
No. Only one animation tag can be assigned to the bone set. You can create a hierarchy of dummies, in the case you mentioned you would need three dummies, action 1 2 and 3 assigned to each and 4 to the bones.
 
Or you can make 4 or more copies of the bones and animate them separately. Then use a visibility statement to make them pop in and out of view at the right moments (assuming you can use visibility with bones?). If you overlap the visibility a bit you can usually avoid visual artifacts.
 
Unfortunately, <Visibility> does not work with bones. A (clumsy) workaround though is to include the "visibility condition(s)" in the animation script. For example:
Code:
(A:SIM ON GROUND,bool) 0 == (A:PLANE ALT ABOVE GROUND, feet) 3.5 - 0.60 * 1 + 1 max 1001 min
(A:LIGHT TAXI,bool) *
(E:Time of Day,enum) 3 == *
(A:PLANE PITCH DEGREES, degrees) -12 &gt; *
and
(A:PLANE ALT ABOVE GROUND, feet) 750 &lt; *
If the condition(s) are not met, the bones are animated such that they "collapse" at frame 0, and hence are "invisible", at frame 1 they "inflate instantly" to their normal position(s).
 
As Bill says, visibility does not work with bones.

You should be able to do what you want with a custom animation though. Just don't use a <Lag> parameter otherwise you will have some unsightly skipping:

Code:
    <Animation>
        <Parameter>
            <Code>
                (L:ACTION,number) 1 ==
                 if{
                     read variable and limit it to a range of 10 to give 0 to 9 keyframes
                 }
                 els{
                    (L:ACTION,number) 2 ==
                    if{
                          read variable ,limit it to a range of 10 and add an offset of 10 to give 10-19 keyframes
                    }
                    els{
                         read variable, limit it to a range of 10 and add an offset of 20 to give 20-29 keyframes
                    }
                 }
            </Code>
            <Lag>50</Lag>
        </Parameter>
    </Animation>
 
As Bill says, visibility does not work with bones.

You should be able to do what you want with a custom animation though. Just don't use a <Lag> parameter otherwise you will have some unsightly skipping:

Code:
    <Animation>
        <Parameter>
            <Code>
                (L:ACTION,number) 1 ==
                 if{
                     read variable and limit it to a range of 10 to give 0 to 9 keyframes
                 }
                 els{
                    (L:ACTION,number) 2 ==
                    if{
                          read variable ,limit it to a range of 10 and add an offset of 10 to give 10-19 keyframes
                    }
                    els{
                         read variable, limit it to a range of 10 and add an offset of 20 to give 20-29 keyframes
                    }
                 }
            </Code>
            <Lag>50</Lag>
        </Parameter>
    </Animation>

I like this method looks really promising, just provide the offset and a variable that would drive the animation.

The only thing I'm thinking at this point is how to tell which model is which once I create them in the simulation, to tell specific actions to each of them individually. In other words, if I create 3 simobjects in the simulation, but all of them are of the same MDL, if i start assigning an action using an L:Var all of them 3 will perform the exact same animation because they all 3 have same code in the MDL. I was thinking that maybe if I select a A:var that is not being used by the AIs or poorly used maybe I could use it as the ACTION variable and send or even set that variable to a specific SimObjectID to tell to one of those 3 models to perform an action and the others to do nothing???

Regards,

Manuel
 
L:vars are specific to the current aircraft and if you have 3 of the same aircraft then they will all use the same L:var.

I'm pretty sure that any sort of changes made to an L:var by an aircraft loaded that is not the user aircraft simply gets ignored. I'm not sure as I haven't really done much testing, but if you load an aircraft as AI and it uses L:vars then the L:vars will not be created. I believe it is only the user aircraft that can create L:vars.

So, in a multiplayer situation if 3 people log on and they all have the same aircraft that uses L:vars then this will happen:
Any changes the user makes to an L:var will be reflected in the other two aircraft on the user's computer. Those changes will not be transmitted over multiplayer.

You can limit the L:var to work on your own aircraft by checking (A:IS USER SIM,bool) which will return TRUE if the current aircraft is the one you are flying.

If you want to control AI traffic then you can use (A:AI TRAFFIC STATE,enum) to some extent based on the traffic state.

Using an unused A:var would involve using one that is transmitted over multiplayer and the selection of those is very limited and I'm not sure whether you would be allowed to write to them if the aircraft is not the user aircraft.

You may need something like a custom module. Refer to the Creating XML Gauges section of the SDK for information on C: variables. The traffic module allows you to read various details on AI aircraft using C: variables.

Using Simconnect you can create your own module and using SimConnect_SetDataOnSimObject you can write to various variables for that aircraft. You could in this case write to the Spoilers handle position which is transmitted over MP and that might work.
 
Back
Top