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

FSX FSX visibility and animation problem

Messages
1,749
Country
unitedstates
I am having a problem using tags and animation on the same gmax part.

I am using a visibilty tag and custom animation!

When i load game i get a zoom of 48.00 in exterior view?

I figure it might be my animation xml code or just using so much on 1 part.

It works fine when i use the animation. But I am not sure the animation works until I have my VC ready!

So why are these parts with double tags giving me this problem. Is it my animation?

<PartInfo>
<Name>seat_forward</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:random_4, bool) 100 *
</Code>
<lag>100</lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<Tooltip_Text>Adjust Seat</Tooltip_Text>
<Callback_Code>
(L:random_4, bool) ! (&gt;L:random_4, bool) 1 (&gt;L:XMLSND26,enum)
</Callback_Code>
</MouseRect>
</PartInfo>


DG:eek:
 
Last edited:
the exterior problem happens when you add animation or visibilty to a part that has scaling issues

so, if you know the part that causes it, simply reset the SCALE and ROTATION in gmax [if that is what you use] and then re-apply the animation/visibilty tags and it should fix it
 
Thanks

I will try to fix it now! thanks you!

Update:
I added the code to my back seats and they don't animate. Same problem!
The only thing animating in my vc is the door handles. I have a gauge that controls that.

So the big question is how can I make custom animation with the xml part having mouse control???

Here is the code for my left window I created for fs9 but updated for fsx. Shows the custom mouse tip in game. Shows up in the manger list. But no animation. I used keys every 25 with animation length 100.

<PartInfo>
<Name>Window_Left</Name>
<Animation>
<Parameter>
<Code>(L:WindowLeft, bool) 100 *</Code>
<Lag>200</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<Tooltip_Text>Left_WINDOW</Tooltip_Text>
<Mouse_Flags>LeftSingle+RightSingle</Mouse_Flags>
<Callback_Code>
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:WindowLeft, bool) -- 1 max (>L:WindowLeft, bool) (>K:WindowLeft, bool)
1 (&gt;L:XMLSND20,enum) }

(M:Event) 'RightSingle' scmp 0 ==
if{ (L:WindowLeft, bool) ++ 1 min 0 (>L:WindowLeft, bool) (>K:WindowLeft, bool)
1 (&gt;L:XMLSND21,enum) }
</Callback_Code>
</MouseRect>
</PartInfo>




DG:eek:
 
Last edited:
Man... I had to dig for this one. Code had dust all over it.


This is in FS9 format. I do not know if FSX can handle this, but it works in FS9. It allows you to drag a part from a pre-animation trek made in Gmax or Max.

Code:
<part>
    <name>pitventl</name>
    <animation>
		<parameter>
			<code>(L:pitventlPos, percent)</code>
		</parameter>
    </animation>
    <mouserect>
        <cursor>Hand</cursor>
		<tooltip_text>Adjustable Cockpit Vent</tooltip_text> 
		<mouse_flags>LeftSingle+LeftDrag+Wheel</mouse_flags>
		<callback_code>
			(M:Event) 'LeftSingle' scmp 0 !=
			if{
			  (L:pitventlX, position) s0 0 !=
			  if{
			    (L:pitventlPos, percent) (M:X) l0 &lt;
			    if{ 5 + 100 min } els{ l0 (M:X) &lt; if{ 5 - 0 max } }
			    (&gt;L:pitventlPos, percent)
			    }
			  }
			(M:X) (&gt;L:pitventlX, position)
		</callback_code>
	</mouserect>
</part>

This code was created by Jess Lambert, Sky Unlimited. Brilliant piece of work for code.

With your seat, you should be able to make the handle as one animation (switch) and the seat as a secondary, or make them both the same code, and have them both clickable with tooltiptext in it. Just animate the lever to pivot, and the seat to slide back and forth. But, if you want the seat to be drag-able, then you'll need something different. Maybe make the lever to not animate, and the seat to animate. That is the only way I know how to do it, unless you could have a separate animate node that has 'move lever if mouse over L:var seat adjuster... (if thats even possible).


Bill
 
Thanks

Hi Lioheart,

Do you create fsx parts?

I have plenty of fs9 xml parts.... here are my seats with sound!


<part>
<name>seat_forward</name>
<animation>
<parameter>
<code>(L:seatforward, percent)</code>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>Adjust Seat</tooltip_text>
<mouse_flags>LeftSingle+LeftDrag+Wheel</mouse_flags>
<callback_code>
(M:Event) 'LeftSingle' scmp 0 !=
if{
(L:ConcordX, position) s0 0 !=
if{
(L:seatforward, percent) (M:X) l0 &lt;
if{ 5 + 100 min } els{ l0 (M:X) &lt; if{ 5 - 0 max } }
(&gt;L:seatforward, percent)
}
}
(M:X) (&gt;L:ConcordX, position)
</callback_code>
</mouserect>
</part>


But my problem is not animating the seat on this forum.......it is on the other forum you replied.
My problem here is I can't use a working visibility tag on 2 seats that don't use animation at all.
The tag works on simple parts. But not these seats for some reason.

I think the problem is my non working parts I converted yesterday.... So better wait on this problem....

Thanks DG:eek:
 
Last edited:
What a complicated bit of script for such a simple task! Why make it so difficult?

You don't need such a complicated scheme to toggle an (L:var,bool). Keep it simple!
Code:
<PartInfo>
  <Name>Window_Left</Name>
  <Animation>
    <Parameter>
      <Code>(L:WindowLeft, bool) 100 *</Code>
      <Lag>200</Lag>
    </Parameter>
  </Animation>
  <MouseRect>
    <Cursor>Hand</Cursor>
    <Tooltip_Text>Left_Window</Tooltip_Text>
    <CallbackCode>
          (L:WindowLeft, bool) ! (>L:WindowLeft, bool)
          (L:WindowLeft, bool) if{ 1 (&gt;L:XMLSND20,enum) }
          (L:WindowLeft, bool) ! if{ 1 (&gt;L:XMLSND21,enum) }
    </CallbackCode>    
  </MouseRect>
</PartInfo>
 
Last edited:
Fixed another problem

HI Bill,

I think i have that window code making a different sound when
opened or closed. That's why.....

I figured out a huge problem i did.

Heres is some on my entries for xml part GUID.

<Animation name="Window_Left" guid="3cdd78d9-7cc7-478d-be21-6f273429a181" length="100" type="Sim" typeParam2="tail_hook" typeParam="AutoPlay" />

<Animation name="Window_Right" guid="92aad115-57f2-4211-9b7c-e9b77af72737" length="100" type="Sim" typeParam2="tail_hook" typeParam="AutoPlay" />

<Animation name="CONCORDE_VISOR_NOSE_HANDLE" guid="5c65fb75-605a-4459-80bb-2fb65ba91539" length="100" type="Sim" typeParam2="tail_hook" typeParam="AutoPlay" />

<Animation name="seat_forward" guid="8e2c684f-83bb-4ad3-a3d4-08e49d06d021" length="100" type="Sim" typeParam2="tail_hook" typeParam="AutoPlay" />

<Animation name="move_seat" guid="45516b71-2da3-49ad-87ed-e1bec89ea4df" length="100" type="Sim" typeParam2="tail_hook" typeParam="AutoPlay" />

<Animation name="gps_swivel" guid="9699467f-a65b-448c-b555-dc95583ca0a0" length="100" type="Sim" typeParam2="tail_hook" typeParam="AutoPlay" />


I was not changing the .....typeParam2=tail_hook

They all said tail hook and they worked when i clicked tail hook too.......lol:duck:

DG:eek:
 
HI Bill,

I think i have that window code making a different sound when
opened or closed. That's why.....

Okay, in that case check the edited script I posted earlier. This will play your two sound files as desired. :D

Actually, I surprised even the ones you wanted to work, worked!

Despite what the SDK states, the two names MUST be present, and they MUST be the same...
 
Ok

I see that your code does have both sounds.

Ok I like that method!

Thanks....

I am about to test your code now that my modeldef is ok.

Update:

The animation with tail hook works on the window.
I tried your code and same thing. Nothing can be clicked.

-----

<Animation name="Window_Left" guid="3cdd78d9-7cc7-478d-be21-6f273429a181" length="100" type="Sim" typeParam2="WindowLeft" typeParam="AutoPlay" />

-----

<PartInfo>
<Name>Window_Left</Name>
<Animation>
<Parameter>
<Code>(L:WindowLeft, bool) 100 *</Code>
<Lag>200</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<Tooltip_Text>Left_Window</Tooltip_Text>
<CallbackCode>
(L:WindowLeft, bool) ! (>L:WindowLeft, bool)
(L:WindowLeft, bool) if{ 1 (&gt;L:XMLSND20,enum) }
(L:WindowLeft, bool) ! if{ 1 (&gt;L:XMLSND21,enum) }
</CallbackCode>
</MouseRect>
</PartInfo>

---

Not working!!!

DG
 
Last edited:
(L:var,bool). Keep it simple!

Even simple is not working.....

I seem to have everything else working like default and custom visibility.

So I quess i better download a xml bugger.

DG:eek:
 
Fixed

Hey I actually have a debugger.

Anyways thanks for all the help!
Just like lionheart I was not adding mouse Rect.

DG:eek:
 
Oh my! Yes, although it seems obvious in retrospect, it's so easy to forget that every animation that requires mouse control needs at least two separate actions:

Animation Tool - assign min/max keyframes, tag with script name.

Attachpoint Tool - tag object with MouseRect name

If any Visibility conditions are required as well...

Attachpoint Tool - tag object with Visibility condition name
 
Back
Top