Jump to content
Sign in to follow this  
Guest John Young

Macros that appear only in winter

Recommended Posts

Guest John Young

I want to build some mounds of snow alongside a swept runway. I can use Novasim to build the mounds but there is no inbuilt function to make the .api macro only appear in winter. I believe the "IfVarRange" parameter in the .api macro needs to be changed to do this. Can anyone tell me the code please?Thanks in anticipation,John

Share this post


Link to post
Share on other sites

Try to place this directly after the Area command:[tt]IfVarRange( : 6F8 0 0 )[/tt]A better option would probably be to use the day of the year (38A) instead of the season (6F8) variable, as the season variable does just split the year in four parts and does not consider that winter is longer on some places then on others, while the landclass/mesh scenery does consider that. But to get the day of the year working correct you would need to know which days belong to your area (Gerrish Grey did some research on that).


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 John Young

Thanks for you prompt reply Arno. I just tested the 6F8 variable and that works fine for mid-winter. I understand what you are saying about the length of seasonality and have the problem you refer to with my ground tiles. I used "Groundmaker" to bolt together 516 x 516 tiles and that works fine but there is a mismatch in the seasonal dates between it and FS9 that I do not know how to correct.I would like to explore the 38A code a little more and if you could tell me how to specify the start and finish date in the macro I might be able to look at the "Groundmaker" code and correct that too.John

Share this post


Link to post
Share on other sites

Then you would have to try something like this:[tt]IfVarRange( :toend 38A 60 330 )Jump32( :showit ):toendJump32( : ):showit[/tt]Because winter normally goes over the new year you can't check it with one statement. I chose to use the reverse check (so no winter) and then jump to the correct source. You could also use two IfVarRange commands to check the end of the year and the begin. In this case I assumed winter is roughly december till february, but that should be adjusted for your region of course.


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 John Young

Thanks Arno, that's very useful. I will get working on it this afternoon.John

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...