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

[Sonic Worlds] Timer Sonic Advance Style Help


Recommended Posts

Hi, I am trying to turn the current, three digit (0:00) time into a (00:00:00) type clock like Sonic Advance.

Here's an example of the clock to illustrate the idea:

sonic_advance-162459-1.jpeg

Just wondering if you guys can help me out on this one so I can also learn about the clock system.

Link to comment
Share on other sites

THIS might help you. That's what you want, right?

Just stay sharp on how the "StandIn" zeroes appear, and how the values of the counters are set (a main GameTimer in milliseconds; every counter's value is GameTimer divided by something).

It's pretty complicated. I tried that, but I'm figuring it out still by experimenting what changes do what. Thanks for the link though.

Link to comment
Share on other sites

It's actually pretty easy if you know a bit of algebra:

- Make two single-digit counter objects; the real Milliseconds counter and a "dummy" one. Whenever the real counter is above 9, make the dummy counter invisible, otherwise make it reappear.

- Your game NEEDS a way to record the amount of time that has passed in frames. So, for every frame that your game runs, have an invisible counter increase by 1.

- If your game has a framerate of 60 frames per second, use the following formula for the real Milliseconds counter:

Milliseconds = (Time elapsed in frames)/60000 mod 100

Here's what the other digits would look like:

Seconds = (Time elapsed in frames)/1000 mod 60

Minutes = (Time elapsed in frames)/10 mod 10 (assuming the maximum time is 9:59.99)

Link to comment
Share on other sites

o.0 *Scratches Head*

Thank you :D

So how do I record the amount of time passed in frames? Also, how to have an invisible counter increase by 1?

Edit: Well, this is my result:

2lcwlzn.png

It in action:

30su8ag.png

Rep+ is coming to you Strife and LH soon though I don't know how to give rep :/

Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...
Simple and Cool...!!! o/

Ok, It's been a long while. I have did it now as I've sadly lost the main file of my work :(

Oh well, what I did is fresh to me so it's all good.

This is the steps I have taken:

1st, that link on the second post, download it.

2nd, copy the milliseconds and the time, and paste it to Sonic Worlds.

3rd, copy the code inside of the file, and paste it in SW at the bottom.

4th, refer to my picture, on 'milliseconds', Set Counter to Floor(GameTimer( "Master_Level" )/10) mod 100.

That's how I did it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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