|
The Ailerons
Stock Animation
|
Template Original SCA Code Edited SCA Code
The two ailerons are separate parts that move in opposition to each other about the X-axis. Each has its own variable that carries the aileron deflection angle.
VAR - hex offset to the variable aileron deflection.
; Part: PARTNAME
:PARTLABEL
Transform_Mat(
0.000000 0.000000 0.000000
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
TransformCall( :DrawPARTNAME 0 0 0 0.000000 VAR 0.000000 0x00 0.000000 0x00 )
TransformEnd
Return
:DrawPARTNAME
SetMaterial( m t )
DrawTriList( index ... vertex indices ... )
Call32( :CHILDPart1 )
..........
Call32( :CHILDPartn )
Return
Original SCA Code Template Edited SCA Code
This is the original object source code for the r_aileron generated by FSDS Pro v2.33 from fxpaint.fsc. Note the Call32( ... ) commands just before the Return command at the end of this code. This is where the "Child Parts" of r_aileron are called. This assures that the animation applied to r_aileron is also applied to those parts which use r_aileron as a parent part.
; Part: r_aileron
:Part000006
Transform_Mat(
202.718826 0.000000 -279.655243
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
SetMaterial( 0 -1 )
DrawTriList( 144
0 1 2
0 2 3
4 5 6
4 6 7
)
SetMaterial( 0 0 )
DrawTriList( 144
8 9 10
8 10 11
12 13 14
12 14 15
16 17 18
16 18 19
20 21 22
20 22 23
)
Call32( :Part000069 )
Call32( :Part000070 )
Call32( :Part000071 )
Call32( :Part000072 )
TransformEnd
Return
Edited SCA Code Template Original SCA Code
This is the edited object source code that produces the animated part r_aileron in fxpaint.mdl.
; Part: r_aileron
:Part000006
Transform_Mat(
202.718826 0.000000 -279.655243
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
TransformCall( :DrawRAileron 0 0 0
0.000000 0x70 0.000000 0x00 0.000000 0x00 )
TransformEnd
Return
:DrawRAileron
SetMaterial( 0 -1 )
DrawTriList( 144
0 1 2
0 2 3
4 5 6
4 6 7
)
SetMaterial( 0 0 )
DrawTriList( 144
8 9 10
8 10 11
12 13 14
12 14 15
16 17 18
16 18 19
20 21 22
20 22 23
)
Call32( :Part000069 ) ;bullet hole
Call32( :Part000070 ) ;bullet hole
Call32( :Part000071 ) ;bullet hole
Call32( :Part000072 ) ;bullet hole
Return
|