Global countdown on every frames and outside of the application

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello,
    I created global time. When the time appears, it starts working with a delay of 6 seconds.
    I want to start and run in the background of the application on every frame and outside the application.

  • Yes i used this option and i used global value.
    Problem is when countdown start then in next frame like be restart countdown and start again ( and i have to wait few seconds). Why ?

  • [MENTION=34938]sic[/MENTION] sorry for late answer, i guess you can solve it in 3 methods.
    1. the best way: increment global variable in global event, at least as global variables are GLOBAL for all frames ;D
    global variable a = timer1
    so on...
    2. maybe it works with "Shared Data" extension, but you need to instanciate Shared Data across all frames.
    3. the worst way:
    store timer value somewhere outside, like ini or array (with delay for saving, loading, setting value takes some time, i think)

    Please login to see this link.

  • Without seeing your code, it's tough to know exactly what's going on with the timer. The way it should work is the global value is counting up the time (Always Add 1 to globalTime), and if that's done in a global event, the timer will always be counting up, no matter what frame you're on.

    If however you put this "global time" value on an active object, and then neglected to set that object as global, this value would set back to 0 when the game jumps to a different frame.

    If you can post an MFA, or paste your code here, we can see what's going on.

  • I wonder if the problem is caused by the Date & Time object not being global. I think it's actually 3 different versions of the Date & Time object in 3 different frames. If you rename one of them, you'll see that the other two don't have the new name. So I think what happens is that the setting on each of them says to start at 1:30. And every time a new frame loads, the old one (which said, say, 1:27) gets destroyed and forgotten, and it loads a new version of the Date & Time object, which then starts at 1:30, since that's what it's supposed to start at.

    Perhaps you need to store the time in a global value, and force each Date & Time object to display the time from that variable, rather than its own time.

    And it might be a good idea to connect each of the Date & Time objects with a qualifer - eg. the "Timed" one like in this picture:

    Please login to see this picture.

    Then, in your global events, you can reference the qualifier instead of the Date & Time object. This will control any Date & Time object, since they all have this same qualifier

    Please login to see this picture.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • ah, I forgot that you can't use qualifiers in global events without :cf25+: Sorry about that. This suggestion might still work:

    Quote

    Perhaps you need to store the time in a global value, and force each Date & Time object to display the time from that variable, rather than its own time.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • looks like you can do it this way:

    Please login to see this picture.

    and then press use calculation:

    Please login to see this picture.

    You'll need to store and set the time in milliseconds though, which will be a little bit fiddly

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • I tried it, but there is no change in the addition, the frame contains 5 seconds delayed.
    And it is possible to set it in such a way as to add to the condition "energy" < 5 always in the entire application and beyond it the countdown starts until it reaches 5?

    Edited once, last by sic (October 9, 2019 at 6:45 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!