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

MSFS20 Triggering Hangar door animation in SimObject by distance?

Sample provided as per request, it is an hangar with automated door

I have added the hangar at K15, parking 10

I heavily commented the script to make it more readable

The script need a correctly configured simobjects, provided one
Hi, with help from rhumbaflappy I have got an animated (open/close) model of a hardened aircraft shelter for my Bitburg Scenery. I have got so far with the SImObject/Script but have a couple of questions arising from your very helpful sample.

1. Does the placement folder and placement.xml file get generated by the sdk compiler, or do I need to manual create the folder and edit into it a modified version of your placement .xml? DOH! - Just realised this is MAMU's scenery file for his demonstration scenery.

2. My worldscipt behaves strangely when I try to position it in the scenery editor. I use the "Add" dialogue but the object does not appear where I click - it is normally offset by a few 10s of metres. Is location of both the visual model and the script dictated by the placement.xml file Lat/Lon position?

Thanks for the great work on this feature - it is genuinely transformative in terms of "immersion" IMHO.
 
Last edited:
I think a menu item would be nice. Maybe enter a numeric code so you don't open a dozen doors when the airport has more than one open-door hangar?
Did you get anywhere with this? I was wondering about setting the transponder as one approaches a numbered hangar. For example, my Bitburg scenery has 72 numbered Tab-Vee shelters of which maybe 8 have parking spots numbered to match the shelter number. Using Mamu’s code the door opens if I spawn to one of those spots, and then closes as one taxied away. On return the door will open as one approaches, but also other shelters will open if one passes them triggering a purely automated animation. Maybe setting the transponder to the destination shelter would solve that?

Maybe something to add to my to do list……
 
With a Huge Vote of Thanks to Rhumbaflappy for his generous assistance, I have managed to get an animated TAB-Vee Hardened Aircraft Shelter working. Furthermore, I have managed to have two shelters working in the same scenery package. It may not be very efficient, but I exported the first animated model from Blender with a new output model name, overwriting the GUID. Then it was relatively straightforward to create a new SimObject and associated WorldScript by cloning and re-naming the folders in the Package Source folder. Next up looks like adding a sound for the alarm bell as the shelter doors move.
 
A question please.

MAMU's sample model.xml appears not to have the GUID in it.
1747412098564.png

But when I export a model line 2 of the model.xml include the GUID.


1747412006706.png


Do I need to edit out the GUID section ? I am having great difficulty getting a new animation to work, which is odd because another did work with the GUID line.

Anyone got any ideas on this please?

Thanks.
 
I would leave the GUID in. The SDK SimObjects in the samples show a GUID.
 
The ModelInfo guid in Simobjects is useless, they are selected using their name from sim.cfg: that one must be unique
 
The ModelInfo guid in Simobjects is useless, they are selected using their name from sim.cfg: that one must be unique
Thanks, I assume unique to the project as opposed to unique globally - that could be tricky to achieve........................
 
Thanks, I assume unique to the project as opposed to unique globally - that could be tricky to achieve........................
It is unique to the whole game, so globally

E.g. Mine are usually like:
mamudesign-icao-objectName

Or something like that

Just avoid to use stuff like

hangar1

And it is quite Easy to be unique
 
It is unique to the whole game, so globally

E.g. Mine are usually like:
mamudesign-icao-objectName

Or something like that

Just avoid to use stuff like

hangar1

And it is quite Easy to be unique
Thank You.
 
I have an ambition to have a two door Hardened Aircraft Shelter animated and triggered by location of the user aircraft. With help I have a working single door shelter, but the two door version is proving problematic.

The model renders as a static object in MSFS2020; and also satisfactorily appears as an unanimated SimObject. However, when I try to animate the doors it does not work.

The animations work in Blender: I have unique names for each animation - i.e Left-Door-Opens / Right-Door-Opens/Lefdt-Door-Closes/Right-Door-Closes and these work individually or as matched pairs in Blender NLA.

Using the .xml files in my source folders in the .rar file linked below ( too large to attach directly ) everything builds with no errors and the SDK generates the WorldScript.spb file. In turn, that appears in the scenery editing WorldScript dialogue and when added the model renders but the doors do not move.

The Blender model has had all modifiers applied and is not large / does not have millions of polygons.

Can anybody spot what I am doing wrong please? The link below has the Blender source files and the MSFS2020 source.

Animated TAB-Vee.rar
 
I have a working door animation (triggered by the distance of your plane) on the small hangar in my EFHN scenery. Four doors sliding at slightly different pace. Unfortunately I am currently away from home and only on my mobile phone so cannot study your files and compare to mine. Will be back at my computer only after August 17th, and can have a look then if your problem still is unsolved...
 
I have a working door animation (triggered by the distance of your plane) on the small hangar in my EFHN scenery. Four doors sliding at slightly different pace. Unfortunately I am currently away from home and only on my mobile phone so cannot study your files and compare to mine. Will be back at my computer only after August 17th, and can have a look then if your problem still is unsolved...
Thank You.
 
UPDATE - a lengthy post but I hope useful to the community.

With much help from Rhumbaflappy I have resolved a number of ambitions for TAB-V shelters with animated doors, and discovered the following.

Using MAMU’s example files from above it is possible to trigger both a single door or a twin-door shelter by proximity. That deals with the two types of NATO shelter with sliding doors. I have not attempted pivoting doors as my scenery is focussed on USAF bases.

However, I also discovered that it is possible to use a single SimObject but have multiple WorldScript files which reference that one SimObject, so that I can have multiple animated TAB-Vs on a airfield which are triggered by proximity, but operate independently of each other - meaning only the shelter you are close to animates.

As MAMU described above, if you spawn into an animated shelter, the door(s) will open. Then once you taxi out, the door closes as you leave the Proximity Trigger area. Or, if you taxi toward an animated shelter the door(s) will open as you approach.

Best of all, only the shelter you leave or approach animates rather than all shelters sharing the same SimObject.

The code change is simply to have a unique GUID for the proximity trigger in MAMU’s Worldscript xml, with all the rest of the code common to all animated shelters.

As I see it this avoids having multiple SimObjects - just the one for all the animated shelters, and although there are multiple WorldScripts, they can all be identical except for the ProximityTrigger GUID.

With the USAF modified “Gen 2” shelter where a single door slid either left or right depending on the infrastructure around the shelter, you do need a separate SimObject for each direction.

I have yet to fully understand how to tailor the proximity trigger area as I do not understand how the Co-ordinates and sizes in the code are related to the SimObject.
 
Back
Top