Sign in to follow this  
phjvh

Switch Start variable "off"

Recommended Posts

Hi folksI want to set a panel switch to be always OFF when aircraft is selected. Seems that, whatever I do, the D@#$ thing is always ON.Its the Eng1 fuel valve, and its a chopper.(A:General eng fuel valve:1,bool) 1 (>K:TOGGLE_FUEL_VALVE_ENG1) 0 (>K:MIXTURE1_LEAN) 0 (>K:PROP_PITCH1_HI) 0 (>L:TOGGLE_STARTER1,enum) Sems that no matter what I set 1 (>K:TOGGLE_FUEL_VALVE_ENG1)................to, 1 or 0, the switch always starts in the ON position.What determines the start state of a switch?

Share this post


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

Hi, You could try a (G:Var), not tested:...(G:Var1)...(G:Var1) 0 == if{ 1 (>G:Var1) (>K:MIXTURE_RICH) } els{ 0 (>G:Var1) (>K:MIXTURE1_LEAN) }...When starting the game the (G:Var) should be 0 and the engine "dead", if that is what you want.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

(A:General eng1 fuel valve, bool) 1 == (G:Var1) 0 == & if{ (>K:TOGGLE_FUEL_VALVE_ENG1) + 1 (>G:Var1) } When the gauge is first loaded G:var1=0. If the fuel valve is on at the same time it will shut the valve off and set G;var1 to 1 so it doesn't check it any more..Also you may want to check the A:Var (A:General eng fuel valve:1,bool)..... Doesn't seem to be a valid Var.Regards,Roman

Share this post


Link to post
Share on other sites

WellThanks for the replies, but nothing seems to work. The A var IS a good one, but I think its because its on a helicopter that it ALWAYS starts with the fuel valve On.Cranky M$ programming :-((Good try guys :-))Steve

Share this post


Link to post
Share on other sites

Steve,May be you have to change first,In sound.cfg:{JET_ENGINE}type=5 (from 3)flags=8viewpoint=1filename=he4link=ENGINE_EXTIn the air file:Change section 310 from 3 to 5After this the code could work perhaps(?)Hope it helpsJan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Roman/JanThanks for all the help, but that DA%& chopper will not play. So I gave up and removed the switch altogether :-))Steve

Share this post


Link to post
Share on other sites

Hi Steve,Why give up? It's really a strange problem but there's a solution for it. I run into the same problem with my J31 panel and the electrics. It seems that in some cases FS2004 won't allow to start a variable with case 0 (could be Battery, Avionics, Fuel or something else). I've searched a long time but did not find out in what situations this happens yet.Try the following solution which should solve your problem:(L:Fuel shutoff Test, bool)(L:Fuel shutoff Test, bool) 0 == if{ (>K:MIXTURE1_LEAN) } els{ (>K:MIXTURE1_RICH) }The above code loads the aircraft with the L: variable case 0 (switch off). The next code sets the mixture lever always lean when the L: variable (your switch) is off. As soon as the switch is toggled to on (case 1) the mixture goes to rich. Of course you could use any other variable here instead of the mixture.Best RegardsMatthias

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