Animated Hangar Doors

#1
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

Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#2
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.
 
#3
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
#4
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.
 
#5
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
#6
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.
 
#7
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
#8
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).
 
#9
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,
 
#11
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.
 
#12
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
 
#13
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

Top