Sign in to follow this  
spokes2112

Trigger and event in XML

Recommended Posts

I can trigger and even whis this sintax1 (>K:event_id)but this only work with event_set type, how can I trigger and event_toggle out side a clik element?Y try with: 1 (>K:event_id_toggle)but don't work.Thanks

Share this post


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

First off, you cannot change the K:variables by just adding _toggle to them. They must be used exactly as provided. So if a K:Var is not provided in a _toggle format it can be usually found in a K:Var_ON and K:Var_OFF format or K:VarSET. Now all that is needed is a reference to the variable's state. I.E. Is it on? Is it off?For example the panel lights variable has these 2 formats. (EventsID.doc -Panel SDK)K:PANEL_LIGHTS_ON K:PANEL_LIGHTS_OFFK:PANEL_LIGHTS_TOGGLESo as a reference:(K:PANEL_LIGHTS_TOGGLE) is the same as: ( Notice a reference to an A:Var to see what state it is currently in. Parameters.doc -panel sdk)(A:Light panel, bool) 1 == if{ (K:PANEL_LIGHTS_OFF) } els{ (K:PANEL_LIGHTS_ON) }That is a very crude code example, for clarity, but it does work and that is what counts.Now to put this example into a line of code without a click, lets say ( has no purpose) if airspeed is greater than 250 it will toggle the panel lights ( Assume K:PANEL_LIGHTS_TOGGLE is NOT available )(A:Airspeed indicated, knots) 250 > if{ (A:Light panel, bool) 1 == if{ (K:PANEL_LIGHTS_OFF) } els{ (K:PANEL_LIGHTS_ON) } } Hope this helps. Roman(KGRB)

Share this post


Link to post
Share on other sites

>First off, you cannot change the K:variables by just adding >_toggle to them. They must be used exactly as provided. So >if a K:Var is not provided in a _toggle format it can be >usually found in a K:Var_ON and K:Var_OFF format or >K:VarSET. Now all that is needed is a reference to the >variable's state. I.E. Is it on? Is it off? Usually but not all (for example TOGGLE_ENGINE1_FAILURE)>(K:PANEL_LIGHTS_TOGGLE) is the same as: ( >Notice a reference to an A:Var to see what state it is >currently in. Parameters.doc -panel sdk) My problem is that this sintax don't work yo must usefor it work the other sintax only work with _SET type events, for example:0 (>K:FUEL_SELECTOR_SET)This work ok, but the event that not need parameters (like TOGGLE ones) need click event format.

Share this post


Link to post
Share on other sites

That's new to me. You can use<Click> 0 (>K:TOGGLE_ENGINE1_FAILURE) </Click>to toggle the engine failure as far as I know. There are however some K:events that are toggling in a <Click Event... and setting in a <Click> 0 (>K:...</Click> line.Arne Bartels

Share this post


Link to post
Share on other sites

My apologies I forgot the & gt; before all the K:Vars, they should look like (>K:Var).Roman(KGRB)Technology Vs. Ignition Timing ,,,,, So far advanced.... It's retarded. :-)

Share this post


Link to post
Share on other sites

>That's new to me. You can use > 0 (>K:TOGGLE_ENGINE1_FAILURE) > >to toggle the engine failure as far as I know. There are >however some K:events that are toggling in a Event... and setting in a 0 >(>K:... line. Thanks, this work ok, I tried 1 (>K:...but seems to nedd 0 for activation

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