Sign in to follow this  
Guest btrpilot

Pilot controlled lighting

Recommended Posts

Hello,I'm curious if anybody anybody has been able to incorporate pilot controlled lighting in their FS9/2002 sceneries. I know that ASD has a PCL macro, but it doesn't work in FS2002/2004.Thanks,Brandon

Share this post


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

Hi!It's not such an awful thing, it's quite easy. I made it for my scenery project but it was done in FSDS using SCASM compiler. The basic idea is to use condition where the wariable used is a variable that carries information about navigation radio frequency. This variable can be for ADF (7BC), NAV1 (7C0), NAV2 (7C2) or COM1 (7BE) instrument. Also take a look in the tutorial here:http://www.combatflight.de/html/scasm-tut/scasm2_eng.html the topic on complex object animations.That's for start of course! Until next time,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

I read the tutorial but it was a little over my head... I'm a newbie with macro design. Could you walk me through the process? Also I'm thinking of purshasing FSDS so I can create animated objects, (eg. hangar door sliding open when I tune nav 2 to a certain freq) is this easier to do in FSDS than GMAX? I can't figure out animation in GMAX and I don't have the time to either, being a high school student.Thanks for your help,Brandon

Share this post


Link to post
Share on other sites

Hi Brandon,How did you make your lighting now? Maybe we can give you some simple commands to add when we know how you have made them.And about the animations, I don't know FSDS good enough, but usually with animations like hangar doors it is the problem that the animation plays endlessly (just like the default animations do). This is not really what we want for a hangar door of course. If you are using GMax you could use CAT to correct this problem. It allows you to add conditions to your animations.Maybe FSDS does not have this problem, I bet Goran can tell us :).

Share this post


Link to post
Share on other sites

Um, I either use FSSC or Airport. I also use AFCAD2, but I don't think you can work with that much.Is there a tutorial on animating in GMAX out there? Preferably something easier for a GMAX newbie to understand?

Share this post


Link to post
Share on other sites

Have a look at my website, you can find a video tutorial about animating with GMax there. This tutorual assumes you already now the basic things of GMax.

Share this post


Link to post
Share on other sites

Hi Brandon!FSDS has more or less enless animations although some other non-endless animations are possible. It is easy to understand and start producing complex objects but with GMAX You can step one level higher (at least). Although I do not use GMAX (but I hope I will very soon), I know that animations here are easier to build and more flexible. So much on this topic.As regrads pilot controlled lighting, I would suggest to make one simple light to test the feature. Create it with scenery object program and then tweak it. For SCASM API's (macros produced with FSDS, EOD or FSNova) You must just add a condition, when to show the light. For example, FSDS macro is looking like this:- header (where properties and positioning of the object is done)- a list of textures used in model- a list of materials used in model- a list of all points used in model- calls for drawing each part of the model- definitions of every part of the modelNow the easiest way to make condition is to "correct" calls. If we have part named light.nav with label :_Part000003 then correct section of calls would look like this:...Call32( :_Part000001 )Call32( :_Part000002 ); Call32( :_Part000003 ) ;comment this line and put it at the endCall32( :_Part000004 )Call32( :_Part000005 )IfVarRange( :SkipPart3 7BC 0x296 0x296 ) ;conditionCall32( :_Part000003 ) ;if ADF freq. is 296kHz, call part 3:SkipPart3 ;otherwise jump over and continueEndVersionReturn...Of course in FSDS You can add these conditions on every part, so FSDS will put them at the right place.Similar to this looks correcting ASM files produced by GMAX the structure of the file looks similar, function names are a little bit different...Hope it helps!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Thanks, Goran for all your help. I think I'll pick up a copy of FSDS sometime soon. I made a simple lamp in EOD and the code looks a little different than yours. Can you help me out here?;macrodesc Lamp (EOD);defaultscale 1;designshape -1,-1,-1,0,0,0,0,-1;--------------------------------------------; Filename: lamp.api; Directory: Program FilesFS Scenery CreatorMacros; Project: ; Designer: ; Date: 2004-08-02; Update: 2004-08-02; Credits: ; Macro generated using EOD 2.2.84; Any commercial distribution or use of this file is prohibited;--------------------------------------------; %1 = Latitude; %2 = Longtitude; %4 = Not used [RefpointScale=1, ObjectScale=0.25]; %5 = Rotation; %6 = Not Used; %7 = Not Used; %8 = Not Used; %9 = Not Used; %10 = Visibility range; %11 = Altitude; %12 = Detail level; 0 = Radial visibility range (x 1.5); %15 = User definedArea( B %1 %2 22 ) mif( %12 ) IfVarRange( : 0346 %12 5 ) mifend PerspectiveCall( :Pos ) ShadowCall( :Pos ) Jump( : ) :Pos mif( %11 ) RefPoint( 3 :End %1 %2 E= %11 V1= %10 V2= 0 ) melse RefPoint( 7 :End 1 %1 %2 V1= %10 V2= 0 ) mifend SetScaleX( :End 0 0 14 ) ; Scale=0.25 mif( %5 ) RotatedCall( :Begin 0 0 %5 ) melse Call( :Begin ) mifend :End Return :Begin Call( :Lamps ) 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 1 RGBLcolor( BF 255 0 0 ) Dot( 0 0 0 ):EndofLamp0 ReturnEndA

Share this post


Link to post
Share on other sites

Hi,try this:;-------------------------------------------------------;macrodesc Lamp (EOD);defaultscale 1;designshape -1,-1,-1,0,0,0,0,-1;--------------------------------------------; Filename: lamp.api; Directory: Program FilesFS Scenery CreatorMacros; Project: ; Designer: ; Date: 2004-08-02; Update: 2004-08-02; Credits: ; Macro generated using EOD 2.2.84; Any commercial distribution or use of this file isprohibited;--------------------------------------------; %1 = Latitude; %2 = Longtitude; %4 = Not used [RefpointScale=1, ObjectScale=0.25]; %5 = Rotation; %6 = Not Used; %7 = Not Used; %8 = Not Used; %9 = Not Used; %10 = Visibility range; %11 = Altitude; %12 = Detail level; 0 = Radial visibility range (x 1.5); %15 = User definedArea( B %1 %2 22 ) mif( %12 ) IfVarRange( : 0346 %12 5 ) mifend PerspectiveCall( :Pos ) ShadowCall( :Pos ) Jump( : ) :Pos mif( %11 ) RefPoint( 3 :End %1 %2 E= %11 V1= %10 V2= 0 ) melse RefPoint( 7 :End 1 %1 %2 V1= %10 V2= 0 ) mifend SetScaleX( :End 0 0 14 ) ; Scale=0.25 mif( %5 ) RotatedCall( :Begin 0 0 %5 ) melse Call( :Begin ) mifend :End Return :Begin ;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 1 RGBLcolor( BF 255 0 0 ) Dot( 0 0 0 ):EndofLamp0 ReturnEndA;-------------------------------------------------But if they have to be illuminated by night, then before my IfVarRange() add a lineIfVarAnd( :Lamps 28C 1 )BTW, since I write this on job, I haven't tested it, but it should work.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hello Goran,I tried it and I got this scasm error message,Error in macro file C:PROGRA~1FSSCEN~1MacrosLITTLE~1.API line 15 -> prohibited -> unknown commandError in line 85 ->

Share this post


Link to post
Share on other sites

In the header of the file the word prohibited is on the next line, but there is no ; in front of it to make it a comment. That is what causes the first part of your error. Maybe if you fix that the other error will also go away.

Share this post


Link to post
Share on other sites

Well it helped, but now it looks like this,Error in line 85 ->

Share this post


Link to post
Share on other sites

Hey! I got it to compile. I deleted the last line with the "-----" after the EndANow I test it out...

Share this post


Link to post
Share on other sites

Ah yes, now I remember, it does not like comments at the end of the file :). It happened to me before and took me a long time to figure out back then.

Share this post


Link to post
Share on other sites

Wow!! Works great! You guys are awesome!!Can you please tell me how to do like a frequency event for my hangar doors? I'm building it for my virtual airline and they really wanted opening doors... So do I build a model with opened doors and then one with closed doors? Then what?

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