Jump to content
Sign in to follow this  
pve

Reset L:vars

Recommended Posts

Hi allFor FS9 XML, I need to reset some L:vars on sim reload from Flight planner change screen. Is there a value I can use to do this?


Paul EGLD

Share this post


Link to post
Share on other sites

Edit: Never mind... I wrote this without fully understanding the question... :(

<Update>   (L:Reset,bool) == 0   if{		0 (>L:MyVariable,unit)		1 (>L:Reset,bool)	 }</Update>


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Hi allFor FS9 XML, I need to reset some L:vars on sim reload from Flight planner change screen. Is there a value I can use to do this?
Hi Paul,I don't think there are any direct variables you can use, but maybe you can use the following "feature" of FS:Under most reload conditions (even when switching from fullscreen to windowed mode v.v.) G:Vars (not: L:Vars) are reset to zero.So if you set a G:Var, and detect a reset of it, such an occurance has happened.Don't know if that works for your type of reload, but if it does, the obvious disadvantage is that it works for other reloads as well (like window mode change).For me, this reset-distinction between G:Vars and L:Vars is the reason I hardly use G:Vars anymore.Cheers, Rob

Share this post


Link to post
Share on other sites
Hi Paul,I don't think there are any direct variables you can use, but maybe you can use the following "feature" of FS:Under most reload conditions (even when switching from fullscreen to windowed mode v.v.) G:Vars (not: L:Vars) are reset to zero.So if you set a G:Var, and detect a reset of it, such an occurance has happened.Don't know if that works for your type of reload, but if it does, the obvious disadvantage is that it works for other reloads as well (like window mode change).For me, this reset-distinction between G:Vars and L:Vars is the reason I hardly use G:Vars anymore.Cheers, Rob
Hi RobI think the G:vars could confuse things. I got this working OK
(L:FPlanNew,bool) ! (@c:FlightPlanTitle) 2 symb ord + (@c:FlightPlanTitle) 10 symb ord + (@c:FlightPlanTitle) 11 symb ord + s7 0 > & if{ l7 (>L:FPlanChange,number) 1 (>L:FPlanNew,bool) } 		  1 0 l7 (L:FPlanChange,number) != ? (>L:FPlanReset,bool) (L:FPlanReset,bool) if{ l7 (>L:FPlanChange,number) }

First line checks for existing FP, Second line check for change and resets L:vars. I may have to put in a timer to cater for large Fplans as it can take some time to reload.


Paul EGLD

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