Jump to content
Sign in to follow this  
arno

BGLC day/night switch

Recommended Posts

Guest

Hi All,perhaps it's a rather stupid question, but I can't anyway figure out the answer, at the moment....Does anyone know which is the equivalent of the old '28C' SCASM variable in BGLC language?I'm trying to make some Gmax-built lights to switch off at day, I know I've to use the IFIN1 command (equivalent to the SCASM's 'IfVarAnd), but I don't know how the '28C' variable has to be written in BGLC.Can anyone help?Thanks in advance

Share this post


Link to post
Share on other sites
Guest

Hi,Command for switching lights off looks as follow: IFIN1 LBL1ms, tod, 2,4 ; ****lights procedure..... LBL1ms label BGLCODE BGL_END BGL_RETURN Mark

Share this post


Link to post
Share on other sites

28C is still 28C :)I think you need to write it hexidecimal as 028ChArno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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

Share this post


Link to post
Share on other sites
Guest

Thanks Mark and Arno,Arno, happy to hear several variables are still the same in BGLC too, just have to write them in hexadecimal.Mark, where did you found the 'LBL1ms, tod' instruction?I guess 'tod' is 'time of day', but I never found an 'LBL1ms' instruction into the FS Scenery SDK.Is there any document I should know and I don't know still?Thanks once more

Share this post


Link to post
Share on other sites

LBL1ms is the name of the label you are jumping to when the time of day doesn't match what you want (so isn't between 2 and 4 in the example). You will have to add this label yourself (and of course you can use any name you like, as long as it is unique).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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

Share this post


Link to post
Share on other sites
Guest

Argh........:-hah....so the variable is just 'tod', and the values are the same used with SCASM programming.Of course, once made clear that 'LML..etc.' is simply a label, I know that I can name it as I like.Once more, thanks!

Share this post


Link to post
Share on other sites

tod is just an alias for 028ch, just to make the code a bit more readable. It is changed into the hex value of the variable by BGLC.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...