Sign in to follow this  
Guest JBH1989

Code Help

Recommended Posts

I need some help with this code. FS cannot recognize it's existence...I am not the greatest programmer, so bear with me please(L:Battery1 Mode,bool)(L:Battery2 Mode,bool)(L:GPU Mode,bool)External AC Master Switch0 (L:Battery1 Mode, bool) ! (>L:Battery1 Mode, bool) 1 (>K:TOGGLE_AFTERBURNER1)0 (L:Battery2 Mode, bool) ! (>L:Battery2 Mode, bool) 1 (>K:TOGGLE_AFTERBURNER1)External AC Master Switch0 (L:GPU Mode,bool) ! (>L:GPU Mode,bool) 1 (>K:TOGGLE_AFTERBURNER1)Thanks in advancehttp://forums.avsim.net/user_files/85903.txtSome of you might recognize this as based off my associate (Matthias') work...

Share this post


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

Hi,This one should work:(L:Battery1 Mode,bool) (L:Battery2 Mode,bool) &&(L:GPU Mode,bool)External AC Master Switch(L:Battery1 Mode, bool) ! (>L:Battery1 Mode, bool) (L:Battery2 Mode, bool) ! (>L:Battery2 Mode, bool) (>K:TOGGLE_AFTERBURNER1)External AC Master Switch(L:GPU Mode,bool) ! (>L:GPUMode,bool) (>K:TOGGLE_AFTERBURNER1)In the first switch, when you have 2 statements between the tags you need to add something.I presume that in the first click the 2 "Bool's" have influence elsewhere, otherwise you don't need two events to let the switch function.Secondly there was a tag missing at the end of that click-event.Hope it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Thanks Jan! The first part works great, now to figure out how to get the ext power part to work... Just messing should do it...Thanks again,JohnAnd if there are any good programmers interested, I need help on my project! lol

Share this post


Link to post
Share on other sites

What project?Everybody here is always helpful!Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Well, its for my EMB120 panel...I need some code that will:Toggle (L:Battery1 Mode,bool) and (L:Battery2 Mode,bool) when clicked upward, using "switch_on.bmp", which after being clicked will return to center (switch_mid.bmp), and will keep the value. However, when clicked downward, it will toggle (L:GPU Mode,bool) (switch_off.bmp) and then return to center. Is this possible with XML?Also, I need some code for a gauge that will engage the engine 1 ignitor only if (L:Start Master1,bool) has a value of 1. I sure hope this makes sense, as I am new to this and am tackling quite a complex task. Thanks in advance for all your help, it won't be forgotten come release time...If possible, could you talk over MSN?

Share this post


Link to post
Share on other sites

1. You can try to experiment with a timer:Value:(A:local time,seconds) (G:Var2) > if{ 0 (>G:Var1) } (G:Var1)Click:(G:Var1) 0 == if{ (A:Local time,seconds) 0.5 + (>G:Var2) 1 (>G:Var1) } els{ 0 (>G:Var1) }You can do the same with another (G:Var) max 9! for the other switch.2. Not sure what you mean, but when you want to do something dependant of a situation this should work:(L:Start Master1,bool) if{ (>K:Toggle...etc...) }Hope it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Thanks a bunch Jan...You interested in a group spot? lol

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