Jump to content
Sign in to follow this  
pve

Timer for bitmap show in sequence

Recommended Posts

Hi all XML FS9 Need to show 10 bitmaps over 3 or less seconds. Will use case with an L:var. How can I code to show them smoothly in sequence.


Paul EGLD

Share this post


Link to post
Share on other sites

Hi Paul,Personally, I don't use structures with more than 2-3 bitmaps anymore (unless they are really big ones). Instead, I use only one image with the whole sequence included, and a command to select which one to show. This saves quite a number of resources, less bmps to load on init, less code to write, and only one bmp in the folder is easy to manipulate.Now, about your question, why don't you try with a simple counter? For example, taking roughly 18 as a second/hz unit, you can change bitmaps every 5 cycles for a total of 50 cycles/10 bmps, or almost 3 seconds.Tom

Share this post


Link to post
Share on other sites

Hello Tom The bitmaps do not rotate or shift they change color so I need to show all of them. I have not used the the tick before and don't know how to code it(I think it can go in update ?) Thanks Paul


Paul EGLD

Share this post


Link to post
Share on other sites

> The bitmaps do not rotate or shift they change color so I>need to show all of them.>I wish I could understand what you want to achieve...> I have not used the the tick before and don't know how to>code it(I think it can go in update ?)>It's very simple, something like this: (YourLVar) ++ d 50 <= * d (>YourLVar) 5 div BMP0BMP1.....BMP10 Tom

Share this post


Link to post
Share on other sites

Tom The code works OK, I now need a switch to start the timer and reaching 10 it stops. Then with the switch I can start the timer and goes back to 0. The code is for light bitmap to get brighter. Thanks Paul


Paul EGLD

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.
×
×
  • Create New...