Archived

This topic is now archived and is closed to further replies.

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?

Share this post


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

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>

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.

Share this post


Link to post
Share on other sites