Sign in to follow this  
Ericson

Pilot controlled lighting - lights remains on...

Recommended Posts

Hello,I've been trying to make working PCL. I've been following advices in this topic -> http://forums.avsim.net/dcboard.php?az=sho...ing_type=search I've problem with setting correct conditionals so lights will remain off ( all day & night ) until 296 is set on ADF. Curretly lights are always "on" and settting 296 makes them brigther ( see attach ). Pls help :-zhelp :-zhelp regardsEricsonHere's code of my api file :; --- Created by FsRegen v0.31bmif (0)Area( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 0.5 %1 %2 )Points( 0-12 0 -11-12 0 1011 0 1011 0 -110 0 0)Poly( a 0 1 2 3 )Poly( a 0 4 3 )Return:endsymblEndAmifendArea( 5 %1 %2 22 )perspectivecall( :OBJ )shadowcall( :OBJ )jump( : ):OBJmif( %11 )refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 %13 %14 )melserefpoint( 7 :END %4 %1 %2 v1= %10 %13 %14 )mifendrotatedcall( :ROT 0 0 %5 )return:ROTIfVarRange( :lowdetail 33B 0 250 )callLibobj( 0 95EFE115 41E4370D EC5FD7A7 FE5936E7 )Jump( :further ):lowdetailcallLibobj( 0 4556113F 466621EF 6FDE6F88 CCDE2C8D ):further Call( :Lamps ) IfVarRange( :SkipPart3 7BC 0x296 0x296 ) ;condition Call32( :Lamps ) ;if ADF freq. is 296kHz, call part 3 :SkipPart3 ;otherwise VectorJump( :West 32767 0 0 0 ) VectorJump( :SouthEast 0 0 32767 0 ):NorthEast Return:SouthEast Return:West VectorJump( :SouthWest 0 0 32767 0 ):NorthWest Return:SouthWest Return:Lamps;Lamp: Object 1RGBLcolor( BF 247 233 145 ) Dot( 0 52 0 ):EndofLamp0 Return:ENDreturnEndA

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,You do call the :Lamps label twice. Both before and after the check of the ADF frequency you can the dot. So when you call it twice it would indeed be brighter. I would suggest code like this (I don't think the VectorJump commands have any purpose here, so I removed these as well):[tt]Area( 5 %1 %2 22 )perspectivecall( :OBJ )shadowcall( :OBJ )jump( : ):OBJmif( %11 )refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 %13 %14 )melserefpoint( 7 :END %4 %1 %2 v1= %10 %13 %14 )mifendrotatedcall( :ROT 0 0 %5 )return:ROTIfVarRange( :lowdetail 33B 0 250 )callLibobj( 0 95EFE115 41E4370D EC5FD7A7 FE5936E7 )Jump( :further ):lowdetailcallLibobj( 0 4556113F 466621EF 6FDE6F88 CCDE2C8D ):furtherIfVarRange( :SkipPart3 7BC 0x296 0x296 ) ;conditionCall32( :Lamps ) ;if ADF freq. is 296kHz, call part 3:SkipPart3 ;otherwiseReturn:Lamps;Lamp: Object 1RGBLcolor( BF 247 233 145 )Dot( 0 52 0 ):EndofLamp0Return:ENDreturnEndA[/tt]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this