sonikku x Posted April 9, 2012 Report Share Posted April 9, 2012 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: 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 More sharing options...
luksamuk Posted April 9, 2012 Report Share Posted April 9, 2012 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). Link to comment Share on other sites More sharing options...
sonikku x Posted April 9, 2012 Author Report Share Posted April 9, 2012 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 More sharing options...
Strife Posted April 9, 2012 Report Share Posted April 9, 2012 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 More sharing options...
sonikku x Posted April 9, 2012 Author Report Share Posted April 9, 2012 o.0 *Scratches Head* Thank you 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: It in action: 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 More sharing options...
Sotsug Posted October 22, 2012 Report Share Posted October 22, 2012 Simple and Cool...!!! o/ Link to comment Share on other sites More sharing options...
sonikku x Posted November 6, 2012 Author Report Share Posted November 6, 2012 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 More sharing options...
Recommended Posts