Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My custom light excludes autogen

Featured Replies

Hello everybody!I've made a custom light in scasm, but when I place it in the scenery the light excludes autogen. I've read about this topic previously but I'm not a expert in scasm programming!.Here is the code of the light macro;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=; API Header Lines added by SceneGenXVersion 1.0 Build 34;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;MACRODESC Lamp (EOD);DEFAULTSCALE 1.00;DEFAULTPARAMS , , , , , , , , , , ;PARAMDESCR , , , , , , , , , , ;DEFAULTRANGE 3000 M;DEFAULTDENSITY NORMAL;TEXTURES , ;DESIGNSHAPELINES -20, -10, -20, 10, -20, 10, -10, 20, -10, 20, 10, 20, 10, 20, 20, 10, 20, 10, 20, -10, 20, -10, 10, -20, 10, -20, -10, -20, -10, -20, -20, -10, ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;--------------------------------------------; Filename: lamp.api; Directory: ; Project: ; Designer: ; Date: 2005-03-05; Update: 2005-03-05; 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 IfVarAnd( :EndofLamp0 28c 6 ) Light( m 0 0.0 0.0 0.0 1073741824 0.0 0.0 FB 255 160 64 0.0 0.0 0.0 )Light( m 0 0.0 0.0 0.0 1073741824 0.0 0.0 FB 255 160 64 0.0 0.0 0.0 )Light( m 0 0.0 0.0 0.0 1073741824 0.0 0.0 FB 255 160 64 0.0 0.0 0.0 ):EndofLamp0 ReturnEndA---------------Thank you!!Pablo

  • Author
  • Commercial Member

Hi Pablo,I don't know if it really solves the autogen exclude, but can you check this macro? There were a few coding errors in the code you posted. For example no v2 value was set. Maybe this code works better (and it is a bit more efficient as well).[tt]Area( B %1 %2 22 )mif( %12 )IfVarRange( : 0346 %12 5 )mifendPerspectiveCall( :os )Jump( : ):osmif( %11 )RefPoint( 2 :End %4 %1 %2 E= %11 V1= %10 V2= 5 )melseRefPoint( 7 :End %4 %1 %2 V1= %10 V2= 5 )mifendmif( %5 )RotatedCall( :Begin 0 0 %5 )melseCall( :Begin )mifend:EndReturn:BeginIfVarAnd( :EndofLamp0 28c 6 )Light( m 0 0.0 0.0 0.0 1073741824 0.0 0.0 FB 255 160 64 0.0 0.0 0.0 ):EndofLamp0ReturnEndA[/tt]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Hello arnoI've tried your code and it worked well but the lights are excluding the buildings.I've attached a screenshotThank youPablo

  • Author
  • Commercial Member

Hi Pablo,Your screenshot does not look to bad if you ask me. You will always get some autogen exclusion, as that is how it is supposted to work.Maybe you could try the dummy RotatedCall we found out for Fs2002 some time I go. Just do a search for dummy RotatedCall on this forum.

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Hello arno, After I read a lot of topics about the rotated call dummy, I get confused! :-hmmm I'd like if you can add to the light macro that code. I usually work with gmax and other tools like sbuilder, so I amnot familiarized with scasmThank you!!!Pablo

  • Author
  • Commercial Member

Hi Pablo,It's a long time ago that I used this trick, so I hope I did it correct. Please try this code:[tt]Area( B %1 %2 22 )mif( %12 )IfVarRange( : 0346 %12 5 )mifendPerspectiveCall( s )Jump( : )smif( %11 )RefPoint( 2 :End %4 %1 %2 E= %11 V1= %10 V2= 5 )melseRefPoint( 7 :End %4 %1 %2 V1= %10 V2= 5 )mifendmif( %5 )RotatedCall( :Begin 0 0 %5 )melseCall( :Begin )mifendRotatedCall( :End):EndReturn:BeginIfVarAnd( :EndofLamp0 28c 6 )Light( m 0 0.0 0.0 0.0 1073741824 0.0 0.0 FB 255 160 64 0.0 0.0 0.0 ):EndofLamp0ReturnEndA[/tt]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.