majky Posted December 11, 2020 Share Posted December 11, 2020 Hi guys, just quick question about xml. Lets say I want to switch master avionics into off position every time I load an aeroplane on ground. it would look like this: (A:SIM ON GROUND,bool) (A:AVIONICS MASTER SWITCH, bool) && if{ (>K:TOGGLE_AVIONICS_MASTER) } now question: how to write into that xml, for fsx to do the toggling only once after loading the aeroplane? Link to comment Share on other sites More sharing options...
f16jockey_2 Posted December 12, 2020 Share Posted December 12, 2020 Use a local variable (in my case L:Init) which keeps track of the initialisation being done already. (L:Init,Enum) 1 != if{ 1 (>L:Init,Enum) } Your commands will come on the blank line between the two comment lines. Wim Link to comment Share on other sites More sharing options...
majky Posted December 12, 2020 Author Share Posted December 12, 2020 it didnt work :( ... at first. than I noticed there is no "/" before "select" at the end. It works now :) thanks a lot! :) Link to comment Share on other sites More sharing options...
f16jockey_2 Posted December 12, 2020 Share Posted December 12, 2020 there is no "/" before "select" at the end. Doh! It's a snippet from one of my own (working) gauges however. Must have lost it when I cleaned out redundant code and tried to align things. Good find! Wim Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now