Jump to content
Sign in to follow this  
javfn

Asynchronous Intermittence

Recommended Posts

Hey everyone!I have many elements that blink when below minumuns, when out of tolerance or when flyin on them for example. The problem is if two blink they blink at the same rhythm. I'm using (P:Local time, seconds) 1 % 0.33 / 1 % near for the intermittence. Do you know how to make each element blink at its own time not synchronouslly?Javier

Share this post


Link to post
Share on other sites

Javier, Just change the code for each part you want blinking differently --- Copied from past AVSIM post.

With this universal code it's very simple to control not only the length of the cycle but the frequency of the blink itself:Pseudocode:<Visble>(P:Absolute time,seconds) "seed" % "blink lapse" > !</Visible>The seed parameter is the total length of the blinking cycle. For example, if you want something to blink on every second, you use 1, if you want it blink every half a second, use 0.5 , every two seconds, 2 ,etc.For each seed, you can determine how long would be the duration of both the visible and invisible part.Then:(P:Absolute time,seconds) 1 % 0.5 > ! ---> this will make the visible and invisible parts of half a second both.(P:Absolute time,seconds) 1 % 0.7 > ! ---> this will make the visible part 70% of the cycle (0.7 secs) and invisible parts of 30 % (0.3 secs).(P:Absolute time,seconds) 0.5 % 0.25 > ! ---> this will make the visible and invisible parts a quarter of second both.You can invert the cycle by removing the "!" char.

Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

Hi Roman!I'm very much thank you, I'm gonna review the math.Javier

Share this post


Link to post
Share on other sites

I think the issue was I was using the same "clock" (P:Local time, seconds) for the intermittence, rather than one for each element causing the sync blinking, not bad for the olimpyc ladies tha swim but in flight simulator taht looks weird : ). Roman The code I was using and your have this problem, it can be solved uisng (P:Local time, seconds) (L:NavGSActTime, number) % 0.2 / 1 % near where the L:var is the time in secs the G/S deviation is out of approach perfomence limits. I wonder if there could be another way to unsync the intermittence whit no need to add a L:var, whit just changing the math in the original calculation?Javier

Share this post


Link to post
Share on other sites

Javier, Ahhh, misinterpreted the exact reason what you wanted to do.. But yeah you got it. More bad = More flashies. The same code applies, just add the correction within reason.Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    53%
    $13,405.00 of $25,000.00 Donate Now
×
×
  • Create New...