Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[Help] Timer


Floofy

Recommended Posts

I'm sure somebody's got this down to a science and has 50+ examples,

The only thing I need to finish my engine is a timer, not just a counter that goes up, I already have that. The problem is when I die and respawn at my checkpoint, the timer is back to zero.

this presents a problem as a competent player could simply die after touching the checkpoint nearest to the goal, and rack up a huge time bonus.

Any examples/explanations would finish this engine.

Link to comment
Share on other sites

Sonic Worlds already has checkpoints and a persistent timer that saves the time you hit them. But if you just dropped this in the wrong forum or something, I'd suggest you consider using either an object with global scope to store the time the checkpoint was reached numerically and load that at the start of the level/reset it on gameover or when the level is finished, or you use a global variable to do pretty much the same thing.

Link to comment
Share on other sites

Noticed this too.

This should be fixeable through saving the timer for when the frame restarts. All you have to do is save it in a Global Value in case of death (unless if it's a Time Over), and load it again in the start of frame.

Make sure to set this Global Value that stores the timer value to 0 in case of death by Time Over or in case you finish the level.

(I am talking about Sonic Worlds. If you're not using Sonic Worlds, just make the level timer in a global value and remember to reset it in the cases I said above.)

Link to comment
Share on other sites

Noticed this too.

This should be fixeable through saving the timer for when the frame restarts. All you have to do is save it in a Global Value in case of death (unless if it's a Time Over), and load it again in the start of frame.

Make sure to set this Global Value that stores the timer value to 0 in case of death by Time Over or in case you finish the level.

(I am talking about Sonic Worlds. If you're not using Sonic Worlds, just make the level timer in a global value and remember to reset it in the cases I said above.)

I'm adding on to Blazefire's 06 engine which is based off of worlds.

I've tried fiddling around with global values but nothing seems to be working... at all...

Here's the MFA

What am I doing wrong?

Link to comment
Share on other sites

One hint:Don't directly post your engines here, in order to avoid future "headaches" for you.

I didn't really lok for your code, but here's what you should do.

attachment.php?attachmentid=1491&stc=1&d=1317260250

You see the even in the green square? That's me, saving the value "Game Timer" to a Global Value Z, when you touch the checkpoint.

When you respawn, just make the "Game Timer" value be the same of Global Value Z.

If you die by Time Over or go to another level, make sure to make Global Value Z reset to 0.

EDIT: Bigger image:

attachment.php?attachmentid=1492&stc=1&d=1317260476

post-1782-138639764862_thumb.jpg

post-1782-138639764863_thumb.jpg

  • Like 1
Link to comment
Share on other sites

One hint:Don't directly post your engines here, in order to avoid future "headaches" for you.

This engine may not look it, but it's is far from complete according to my testers emails today.

I wouldn't post a newly completed engine before the game is done.

Anywho, you're a lifesaver, I've upped your rep, and will be implementing this ASAP.

You too winnie, you've been the first response for all of my help topics.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...