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

Animation problem, help !

Messages
162
Country
italy
Hi all,
as rookie as usual, i cannot succeed to attach an animation to the "exit:" number 3.
calling it "door_passenger" it is linked with the main exit and animates with it.
may be this into makemdl.parts.xml can help ?
a bit confused since it should be for interior parts only...
- model come from gmax
- compiled for FS9
-i have set exits 3 in aircraft.cfg as well

Code:
<part>
      <name>door_passenger</name>
      <animation>
         <parameter>
            <sim>
               <variable>EXIT OPEN:2</variable>
               <units>percent</units>
               <scale>100</scale>
            </sim>
            <lag>30</lag>
         </parameter>
      </animation>
      <mouserect>
         <cursor>Hand</cursor>
         <help_id>HELPID_GAUGE_ANNUNCIATOR_AFT_DOOR</help_id>
         <tooltip_id>TOOLTIPTEXT_CABIN_DOORS</tooltip_id>
         <event_id>TOGGLE_AIRCRAFT_EXIT</event_id>
      </mouserect>
</part>

tia
/mario
 
Last edited:
<event_id>TOGGLE_AIRCRAFT_EXIT</event_id> will never work, as that is only for Door #0 (main door)

For the other exits, you need to use the K:SELECT_n command sequence to tell FS which door to open/close... ;)

(>K:TOGGLE_AIRCRAFT_EXIT,bool)
(>K:SELECT_n,bool)


Here you go...

http://www.aerodynamika.com/cgi-bin/yabb/YaBB.cgi?num=1183384932

Code:
    <part>
	<Name>door_0</Name>
	  <animation>
	     <Parameter>
		 <Sim>
		   <Variable>EXIT OPEN:0</Variable>
		   <Units>percent</Units>
		 </Sim>
	     </Parameter>
	  </animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Main Door</tooltip_text>
		<callback_code>
			(>K:TOGGLE_AIRCRAFT_EXIT,bool)
		</callback_code>
	</mouserect>
    </part>
    <part>
	<Name>door_1</Name>
	  <animation>
	     <Parameter>
		 <Sim>
		   <Variable>EXIT OPEN:1</Variable>
		   <Units>percent</Units>
		 </Sim>
	     </Parameter>
	  </animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Door 2</tooltip_text>
		<callback_code>
			(>K:TOGGLE_AIRCRAFT_EXIT,bool)
			(>K:SELECT_2,bool)
		</callback_code>
	</mouserect>
    </part>
    <part>
	<Name>door_2</Name>
	  <animation>
	     <Parameter>
		 <Sim>
		   <Variable>EXIT OPEN:2</Variable>
		   <Units>percent</Units>
		 </Sim>
	     </Parameter>
	  </animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Door 3</tooltip_text>
		<callback_code>
			(>K:TOGGLE_AIRCRAFT_EXIT,bool)
			(>K:SELECT_3,bool)
		</callback_code>
	</mouserect>
    </part>
    <part>
	<Name>door_3</Name>
	  <animation>
	     <Parameter>
		 <Sim>
		   <Variable>EXIT OPEN:3</Variable>
		   <Units>percent</Units>
		 </Sim>
	     </Parameter>
	  </animation>
	<mouserect>
		<cursor>Hand</cursor>
		<tooltip_text>Door 4</tooltip_text>
		<callback_code>
			(>K:TOGGLE_AIRCRAFT_EXIT,bool)
			(>K:SELECT_4,bool)
		</callback_code>
	</mouserect>
    </part>
 
Last edited:
Hi there,

I also use the
Code:
			(>K:TOGGLE_AIRCRAFT_EXIT,bool)
			(>K:SELECT_2,bool)
within my loadmanager gauge to open and close different exits automatically when changing the payload. I find it really annoying that you cannot open two exits at the same time using this method. You have to open one after the other and timing that with XML is frustrating.
Is there another way?

Vitus
 
One possibility would be to rewrite the scripts such that the doors will open/close in response to multiple conditions...

For example:

Door#1 will open/close if either the door0 event is called for, or an "all doors" event is sent.
 
I'm not sure what you mean...
To give you an idea, here is a code snippet:

Code:
          (L:PAYLOAD LOAD RIGHT,kilogram) 1 -
          (L:PAYLOAD LOAD RIGHT,kilogram) 1 +
          (A:PAYLOAD STATION WEIGHT:14,kilogram) rng !
          if{
            (A:EXIT OPEN:1,percent) 0 ==
            (L:EXIT1 OPEN,bool) 0 ==
            and
            if{
              (&gt;K:TOGGLE_AIRCRAFT_EXIT)
              (&gt;K:SELECT_2)
              1 (&gt;L:EXIT1 OPEN,bool)
            }
          }

I use a section like this for every one of the three affected doors. That works if you load one station after the next, but if you load all three stations at the same time - thus executing the opening code for every door at the same time - just ONE of the doors will open. The same is happening if you try to open two different doors at the same time using keystrokes. That won't work.

I noticed that the EXIT OPEN token variable is marked "settable" in the sdk. Hence one option would be to set it with my simConnect module - but I would prefer to use an easier solution, if possible.

Regards
Vitus
 
Last edited:
Think about the animation XML scripts in makemdl.parts.xml or modeldef.xml file instead!

Instead of:
Code:
	  <Animation>
	     <Parameter>
		 <Sim>
		   <Variable>EXIT OPEN:3</Variable>
		   <Units>percent</Units>
		 </Sim>
	     </Parameter>
	  </Animation>

try something like this:
Code:
	  <Animation>
	     <Parameter>
		 <Code>
		   (L:AllDoors,bool) 0 !=
		     if{ (L:AllDoors,bool) 100 * }
		     els{ (A:Exit Open:3,percent)  }
		 </Code>
	     </Parameter>
	  </Animation>

Create a set of the above for all doors. If you set (L:AllDoors,bool) to one, then that will be used to drive the animations for all doors, otherwise each door will use it's own A:variable to drive the animation.
 
Last edited:
It's been many years ago now and I frankly don't remember what it was for by now...

...but I do remember that when sending sequential Select events I had to introduce a slight delay of about 1 second between them.

For all practical purposes the simmer would see things happening simultaneously, but they actually were not...

The command sequence follows logic like this:

Code:
(>K:TOGGLE_AIRCRAFT_EXIT)

@WaitASecond

(>K:TOGGLE_AIRCRAFT_EXIT)
(>K:SELECT_2)

@WaitASecond

(>K:TOGGLE_AIRCRAFT_EXIT)
(>K:SELECT_3)

@WaitASecond

(>K:TOGGLE_AIRCRAFT_EXIT)
(>K:SELECT_4)
 
Back
Top