|
The Propeller
Stock Animation
|
Template Original SCA Code Edited SCA Code
There are three props to animate: prop_still, prop_slow and prop_blurred, each visible within a specific RPM range.
VAR1 - hex offset to the variable prop0_rpm (prop speed) VAR2 - hex offset to the variable prop0_pos (prop position).
; Part: PARTNAME
:PARTLABEL
IfVarRange( :RETPARTNAME VAR1 0 8192 )
Jump( :PARTNAME )
:RETPARTNAME
Return
:PARTNAME
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 0x00 0.000000 VAR2 0.000000 0x00 )
TransformEnd
Return
:DrawPARTNAME
SetMaterial( m t )
DrawTriList( index ... vertex indices ... )
Return
Original SCA Code Template Edited SCA Code
This is the original object source code for prop_still, prop_slow and prop_blurred generated by FSDS Pro v2.33 from fxpaint.fsc.
; Part: prop_still
:Part000082
Transform_Mat(
0.000000 0.000000 240.484756
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
SetMaterial( 3 -1 )
DrawTriList( 1084
0 1 2
0 3 4
0 5 6
0 7 8
9 10 11
12 13 11
14 15 11
16 17 11
)
TransformEnd
Return
; Part: prop_slow
:Part000083
Transform_Mat(
0.000000 0.000000 240.484756
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
SetMaterial( 2 0 )
DrawTriList( 1102
0 1 2
0 3 4
0 5 6
0 7 8
9 10 11
12 13 11
14 15 11
16 17 11
)
TransformEnd
Return
; Part: prop_blurred
:Part000084
Transform_Mat(
0.000000 0.000000 240.484756
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
SetMaterial( 4 0 )
DrawTriList( 1120
0 1 2
0 3 4
0 5 6
0 7 8
9 10 11
12 13 11
14 15 11
16 17 11
)
TransformEnd
Return
Edited SCA Code Template Original SCA Code
This is the edited object source code that produces the animated parts prop_still, prop_slow and prop_blurred in fxpaint.mdl. The original model uses a range of 0 - 4096 for prop_still, 4097 - 8192 for prop_slow, and 0 - 8192 for prop_blurred. By expanding these range tests, you can make prop_still and prop_slow appear for a longer period of time.
Note the slight difference in the range test for prop_blurred. Instead of drawing the part if the prop speed is in range, it only draws the part if the prop speed is not in range.
; Part: prop_still
:Part000082
IfVarRange( :RETPropStill AE 0 8192 )
Jump( :PropStill )
:RETPropStill
Return
:PropStill
Transform_Mat(
0.000000 0.000000 240.484756
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
TransformCall( :DrawPropStill 0 0 0
0.000000 0x00 0.000000 0xAC 0.000000 0x00 )
TransformEnd
Return
:DrawPropStill
SetMaterial( 3 -1 )
DrawTriList( 1084
0 1 2
0 3 4
0 5 6
0 7 8
9 10 11
12 13 11
14 15 11
16 17 11
)
Return
; Part: prop_slow
:Part000083
IfVarRange( :RETPropSlow AE 8193 16584 )
Jump( :PropSlow )
:RETPropSlow
Return
:PropSlow
Transform_Mat(
0.000000 0.000000 240.484756
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
TransformCall( :DrawPropSlow 0 0 0
0.000000 0x00 0.000000 0xAC 0.000000 0x00 )
TransformEnd
Return
:DrawPropSlow
SetMaterial( 2 -1 )
DrawTriList( 1102
0 1 2
0 3 4
0 5 6
0 7 8
9 10 11
12 13 11
14 15 11
16 17 11
)
Return
; Part: prop_blurred
:Part000084
IfVarRange( :PropBlur AE 0 16584 )
Return
:PropBlur
Transform_Mat(
0.000000 0.000000 240.484756
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
)
TransformCall( :DrawPropBlur 0 0 0 0
000000 0x00 0.000000 0xAC 0.000000 0x00 )
TransformEnd
Return
:DrawPropBlur
SetMaterial( 4 -1 )
DrawTriList( 1120
0 1 2
0 3 4
0 5 6
0 7 8
9 10 11
12 13 11
14 15 11
16 17 11
)
Return
|