License from €75
DE EN FR ES IT CZ

play time counter

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 9 years ago
    Hi,
    I am trying  to implement some play time counter.

    As a reference I am using this tutorial by AFRLme:
    The downloaded resource example is not stable, some times on load it's crushed.

    Any one know why?
    It's also heppned in my game, I thinging somthing is wrong in the 'update_playtime' loop.

    10X
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.

    Get 15 % off Try it for free
  3. · 9 years ago
    Have you checked the messages.log file to see what's happening?

    On another note, how long is the pause that you are using between loops? Visionaire doesn't like it when the loops are really fast between each other & can cause the engine to crash - especially if you remove the pause entirely. There needs to be at least a 20ms pause between loops, but 100ms or higher would be safer.

    Anyway, I would recommend using the display object text & linking it to an interface, that way you only need 1 action block for that. Technically you don't even need the update text action block as you could combine it inside of the update timer action block.

    display object text "<vs=playtime>" (link the object text to an interface assigned to your character)
    pause for 1000ms
    values "playtime" + 1
    jump to action part #1
  4. · 9 years ago
    Thank you AFRLme.

    For the first part of your replay: 
    The probloam I talking about is happens in the example of the tutorial, I didn't change the pause time and they are on 140 and 150 ms.
    In the messages.log file there is noting spacial except the line:
    Error: Abnormal program termination. 

    For the secound part of your replay:
    It is a butter and more comfortable why but it didn't solved the crushing issue. I using a pusee time of 1 sec to be sure.

    Is the example of the tutorial crused only for me? 
    Thanks again.
  5. · 9 years ago
    Can you make sure you have the log level set to "info" in the options for the Visionaire Studio editor please? Extras > options... > player: log level. More information should get posted into the log with the level set to "info".

    P.S: feel free to zip/rar/7zip up your project & send it to me so I can take a look at what's wrong or consider posting some screenshots or a video to show us how you have set it all up as screenshots can often tell a lot more than words alone.
  6. · 9 years ago
    Yes my log level is on "info".

    I am sorry that I insist but if we will undersend the problem that cause  the cruse on the example of the tutorial we will solved the problem.

    I appreciate your help so much and don't have problem to send you my project but I don't wants to burden you especially when the problem happens on the example of the tutorial.

    Thank you.

  7. · 9 years ago
    Ok I think I solved it by replace the usage of 'update_playtime' loop with:
    registerEventHandler("mainLoop", "update_playtime").

    Thanks again.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?