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

Animated Hangar Doors

Messages
20
Hi folks,
I have been working on getting my hangar doors to open using a simple switch. First some specs, I'm using EOD for the hangar design and FSSC for placing the macro and of course SCASM for compiling. My first attachment is the original api.
With Goran's help I was able to add a condition switch, like this,

(notice the nav1 is set for 118.00, thats not a valid frequency, also it says that 7C0 is for nav1 but 7B0 is used, is that a typo or am I missing something?)

;------------------------------
IfVarRange( :close_door 7B0 0x1800 0x1800 ) ;var. 7C0 is for NAV1, 0x1800 is for 118.00
; draw_open_door
TransformCall( :part011 -321 0 -113 0 0 0 0 0 0 ) ;Cube 55_02
TransformCall( :part012 -333 0 33 0 0 0 0 0 0 ) ;Cube 55_08
TransformCall( :part013 -294 10 -113 0 0 0 0 0 0 ) ;Cube 55_13
TransformCall( :part014 -272 10 -113 0 0 0 0 0 0 ) ;Cube 55_14

Jump( :_skip )
:close_door
; draw_closed_door
TransformCall( :part015 -333 12 -95 0 0 0 0 0 0 ) ;Cube 55_15
TransformCall( :part016 -333 12 -31 0 0 0 0 0 0 ) ;Cube 55_16
TransformCall( :part017 -333 12 1 0 0 0 0 0 0 ) ;Cube 55_17
TransformCall( :part018 -311 12 47 0 0 0 0 0 0 ) ;Cube 55_18
TransformCall( :part019 -276 12 47 0 0 0 0 0 0 ) ;Cube 55_19
;------------------------------
;
:_skip
TransformCall( :part000 272 0 300 0 0 0 0 0 0 ) ;Cube 1_02
TransformCall( :part001 -53 0 -130 0 0 0 0 0 0 ) ;Cube 1_05
TransformCall( :part002 229 0 -125 0 0 0 0 0 0 ) ;Cube 1_06
TransformCall( :part003 107 0 -130 0 0 0 0 0 0 ) ;Cube 1_07
TransformCall( :part004 -245 0 327 0 0 0 0 0 0 ) ;Cube 1_15
TransformCall( :part005 27 180 -23 0 0 0 0 0 0 ) ;Cube 12_05
TransformCall( :part006 -293 0 -33 0 0 0 0 0 0 ) ;Cube 54_02
TransformCall( :part007 27 0 327 0 0 0 0 0 0 ) ;Cube 81_04
TransformCall( :part008 27 0 27 0 0 0 0 0 0 ) ;Cube 81_05
TransformCall( :part009 27 180 177 0 0 0 0 0 0 ) ;Cube 12_06
TransformCall( :part010 27 180 377 0 0 0 0 0 0 ) ;Cube 12_07
; TransformCall( :part011 -321 0 -113 0 0 0 0 0 0 ) ;Cube 55_02
; TransformCall( :part012 -333 0 33 0 0 0 0 0 0 ) ;Cube 55_08
; TransformCall( :part013 -294 10 -113 0 0 0 0 0 0 ) ;Cube 55_13
; TransformCall( :part014 -272 10 -113 0 0 0 0 0 0 ) ;Cube 55_14
; TransformCall( :part015 -333 12 -95 0 0 0 0 0 0 ) ;Cube 55_15
; TransformCall( :part016 -333 12 -31 0 0 0 0 0 0 ) ;Cube 55_16
; TransformCall( :part017 -333 12 1 0 0 0 0 0 0 ) ;Cube 55_17
; TransformCall( :part018 -311 12 47 0 0 0 0 0 0 ) ;Cube 55_18
; TransformCall( :part019 -276 12 47 0 0 0 0 0 0 ) ;Cube 55_19
TransformCall( :part020 -343 30 177 0 0 0 0 0 0 ) ;Cylinder 134_02
TransformCall( :part021 -343 0 160 0 0 0 0 0 0 ) ;Cube 81_06
TransformCall( :part022 303 65 -38 0 0 0 0 0 0 ) ;Cube 75_04
TransformCall( :part023 -333 26 33 0 0 0 0 0 0 ) ;Cube 79_02
TransformCall( :part024 -321 26 -113 0 0 0 0 0 0 ) ;Cube 80_02
TransformCall( :part025 -110 0 474 0 0 0 0 0 0 ) ;Cube 1_16
TransformCall( :part026 227 185 -128 0 0 0 0 0 0 ) ;Cube 1_21
TransformCall( :part026 -173 185 -128 0 0 0 0 0 0 ) ;Cube 1_22
TransformCall( :part028 -371 0 -128 0 0 0 0 0 0 ) ;Cube 1_23
TransformCall( :part028 424 0 -128 0 0 0 0 0 0 ) ;Cube 1_24
TransformCall( :part030 -249 65 392 0 0 0 0 0 0 ) ;Cube 75_05
TransformCall( :part031 -310 55 280 0 0 0 0 0 0 ) ;Cone 135_04
TransformCall( :part032 -310 25 280 0 0 0 0 0 0 ) ;Cylinder 134_04
TransformCall( :part033 -245 0 27 0 0 0 0 0 0 ) ;Cube 1_25
TransformCall( :part034 165 0 474 0 0 0 0 0 0 ) ;Cube 1_26
TransformCall( :part031 -343 65 177 0 0 0 0 0 0 ) ;Cone 135_05
TransformCall( :part036 299 0 27 0 0 0 0 0 0 ) ;Cube 1_27
TransformCall( :part003 -182 0 -125 0 0 0 0 0 0 ) ;Cube 1_03
TransformCall( :part003 -266 0 -130 0 0 0 0 0 0 ) ;Cube 1_04
TransformCall( :part039 340 0 -125 0 0 0 0 0 0 ) ;Cube 1_08
TransformCall( :part003 324 0 -130 0 0 0 0 0 0 ) ;Cube 1_09
TransformCall( :part003 -288 0 -125 0 0 0 0 0 0 ) ;Cube 1_10
Return

It compiled fine but did not open/close of course because I couldn't tune 118.0 in the NAV1.

Thanks for taking the time out to help me, I really appreciate it,

Brandon
 

Attachments

  • animated_hangar.api
    31.3 KB · Views: 594
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
As Goran is on vacation now, I will try to answer this. Have you tried to use 07C0 instead of the 07B0? I think that is a typo, 07C0 should be NAV1. Or else you can try 07C2 which is NAV2 (I am sure of that). Then you can test if the code works OK for the rest.
 
Messages
20
Hey! It works!
I just fixed the variable with 7C0 and moved some of the shapes around and PRESTO! opening doors.

Okay, so how hard would it be to animate the doors, do I have to model the door position for every 'frame'? Or is there an easier way?

Thanks so much Goran and Arno for helping me out.

Brandon
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi Brandon,

Which tool are you using? Was it EOD? I think EOD does not support making animations, so then you would have to make a transformation for each animation frame.

If you use a tool like FSDS or GMax you only have to define the begin and end position and tell how long the animation lasts. The movement between those points is then calculated automatically.
 
Messages
20
Hmm, sounds kind of complex. There isn't any way to convert the EOD source files to FSDS or Gmax is there? I don't really want to redesign the hangar if I don't have to... ;)

Brandon
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Nope, unfortunately not.

The only way to do it with the EOD code is to use the method described in the SCASM tutorial Goran refered to. But this requires some hand editing of the code and is also rather complex.
 
Messages
20
Ok, I'll read up on animation in Gmax.
One question, does FSDS have a 'condition' feature for animation or does its animations run continuously like Gmax?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
I think by default the animations in FSDS are the same as in GMax, so also endlessly. But I don't know if FSDS also supports other conditions (so you can make your own animation for example). I am sure an user of FSDS can tell you (Goran when he is back from vacation for example).
 
Messages
152
Hi!
Animations in FSDS can be complex or easy, depending on what Yo want to do.
For example, You can open the doors using conditions like distance of the aircraft. Imagine that You have a hangar with 10 part sliding doors to one side of the hangar. You can set conditions to each of these doors when to show (or hide). This is quite easy but animation is not smooth.
Next variation is that you have zog-zag door which is opening to the side of the hangar. For example You want to have 20 frame animation; in this case You have to copy the same door 20 times so You'll get 20 doors (one of them is completely open and one completely closed). For each of these doors You can define its looks (or opened state) and also a condition at which it shows, for example distace of the aircraft. This way You can get nice smooth animation but usually dependable on the distance of the aircraft and a lot of polygons...
Another possible animation is continous rotation or translation. This can be made by Animation module of FSDS and I think You can define also how many seconds will last this loop.
FSDS from version 2.2x has again old TransformCall() possibilities so You can use this for some animations also but I can imagine only use with variable C74 or C72 - wind.

Everything else is more or less by hand. At least that's how I did animated doors on hangars on LJLJ airport or fence doors on LJMB. I have defined how many frames I want (or TransformCalls for the SAME part), a condition on which animation begin (NAV/ADF) and also checkpoints of the animation so the animation is not started again somewhere in the middle. And with a lot of help of Andreas Klisch's tutorial and SCASM manual of course!
What is most important with TransformCall() and TransformMat()/ TransformEnd instructions is that You work on the same part and You can translate and/or rotate it. Everything else is just logic and questioning the FS if time is xx, then do that.

Sorry about the typo. I was at my job and working more or less from the head. Thanks Arno for correcting me!

Best regards,
 
Messages
20
No problem Goran, its all good :cool:

Thanks for taking the time to set up the code for me. I really appreciate it.

Brandon
 
Messages
62
Country
us-illinois
Brandon fear not the gMax..

Having zero experience in ANY fs9 design other than AFCAD, I've learned my way around gMax in about two week. That includes making animations. With the help from others here. hmm animated doors... ok I'm off to try that now.
 
Messages
1,484
interesting comments Tachyon....I've theorized that part of why folks think Gmax is hard to learn is that they learned a different set of terms and techniques from fsds. Your story lends credence to that theory.

Bob
 
Messages
62
Country
us-illinois
Bob .. not to toot my own horn but ... tutatoooooo !
The first one I did the first week cuz I HATED the oil derrick monstrosity that MS created.
The second one (or ones) I did the 2nd week. It's my local (and default) airport.
The 3rd one I did last week cuz there is a wind farm with 68 of these bad boys about 20 minutes west of me and again the MSFS one was impotent. Mine is 85 meters of animated 850kw generator love! (yes, the anemometer is also animated. Because I could.)
 

Attachments

  • Beacon.JPG
    Beacon.JPG
    22.5 KB · Views: 514
  • Airport.JPG
    Airport.JPG
    80.1 KB · Views: 540
  • G54.JPG
    G54.JPG
    18.3 KB · Views: 488
Top