Sign in to follow this  
nickpike

XML Timer Issues

Recommended Posts

I need an XML timer that will turn ON a variable for X seconds every Y seconds. So far, I've been unsuccessful in this venture.I want to create a "fake ATC interrogation request" every 40 seconds or so, and have the "R" displayed for about 5 seconds or so.This is such a trivial bit of code in C, but I just can't seem to get my head wrapped around the solution! :(I do know that it requires two timer circuits; one to initiate the "Interrogation," and another to keep the "R" displayed for 5 seconds, and that the "R" timer needs to be nested in the "Interrogation" timer.I'd be deeply grateful for any help! ;)

Share this post


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

It never fails! One minute and thirty-seven seconds after posting a plea for help... I find a solution... ;)It ain't pretty, but it's functional:(L:ATC_FakeTimer,seconds) 1 + (>L:ATC_FakeTimer,seconds)(L:ATC_FakeTimer,seconds) 360 > if{ 1 (>L:ATC_Fake,bool) (L:ATC_FakeTimer,seconds) 450 > if{ 0 (>L:ATC_FakeTimer,seconds) 0 (>L:ATC_Fake,bool) } }

Share this post


Link to post
Share on other sites

or(L:ATC_FakeTimer,seconds) 1 + s0 (>L:ATC_FakeTimer,seconds) l0 39 > if{ (>L:ATC_Fake,bool) } l0 44 > if{ 0 (>L:ATC_FakeTimer,seconds) 0 (>L:ATC_Fake,bool) }not testednick

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