Hi Gents
Sharing knowledge is very important for me, I would have saved a lot of time with more exchanges between people interested on how to tweak.
Aussie, the tweak in the SCASM code can be done as it, you'll quickly adapt it to the ASM code
;uName:
g_lightStates uOffset:
0x0180
IfVarAnd( :L156744
0x0180 0x01 )
Light( m 4 0.0329999998 -0.0769999996 -0.0649999976 20 0.6000000238 0.4000000060 E5 0 0 255 0.0000000000 0.0000000000 1.0000000000 )
0x0180 is the offset for g_lightstates for this file, different for any file made by Gmax ( search it in the top animation list on the SCASM file ),
0x01 indicates it's for nav lights (nav lights 0x01, landing lights 0x04, strobe lights 0x10, ....)
m 4 defines nav lights in the light itself, E5 0 0 255 is the colour.
You have to change what is red with what is blue for a use with tailhook (only an example, can be done with an other key-framed animation, concorde_nose, f_canopy, ...)
;uName:
tailhook uOffset:
0xD4
IfInf( :L156744
0xD4 1 200 )
Light( m 4 0.0329999998 -0.0769999996 -0.0649999976 20 0.6000000238 0.4000000060 E5 0 0 255 0.0000000000 0.0000000000 1.0000000000 )
1 200 in the IfInf table means the nav light will show when the key framed tailhook animation will be between 1 to 200, it won't show if the value is 0 ( you don't need to have this key framed animation set up in the model for it to work ) the problem with tailhook is that the animation is timed, so if the light will switch on immediately, it will switch off at the end of the animation timing.
You have a text to add to the aircraft.cfg for the tailhook animation to work.
For landing lights the code is this one:
;uName:
g_lightStates uOffset:
0x0180
IfVarAnd( :L2600D0
0x0180 0x04 )
Light( m
11 0.0920000002 -0.1019999981 0.0560000017 20 0.6000000238 0.4000000060 FF 255 255 255 0.0000000000 0.0000000000 1.0000000000 )
You have to change to have it working with l_spoiler:
;uName:
l_spoiler uOffset:
0xF2
IfInf( :L2600D0
0xF2 1 200 )
Light( m
5 0.0920000002 -0.1019999981 0.0560000017 20 0.6000000238 0.4000000060 FF 255 255 255 0.0000000000 0.0000000000 1.0000000000 )
Not tested, but I believe Light(m 11 won't work in CFS2, replace it with 5.
1 200 is the fork for the landing lights to show, you can change it to 99 200 by example if your landing light is mounted on a moving pad, the light will show at the pad animation's end.
You have to give a value in the air file for the spoilers animation to work, record 320, enter an angle in the Spoilers Angle Limit (1 by example ), no necessity to have spoilers available in record 327, it won't affect the flight dynamics. You can set up the timing in record 1101 primary aerodynamics, Spoilers Cycle Time.
Hope that helps, cheers
Martin