How do I create a running clock in my game that stays from screen to screen. Also how would create a custom sprite for the clock. Thank you for the help!
If you make the clock a global object, this means it won't get destroyed on layout changes.
Try this. Global variable for clock. Every tick set clock to "dt." This will make a consistent clock regardless of framerate. Make a text box. Every tick set text to global variable clock. I don't know how to have it show only seconds, but someone else might.
ptbcomposer
int(clock) will clear the decimals
Hmm, yes, thanks! Also, I forgot to mention. You can reset global variables to their initial value in the System events. That's the reason to make the clock text box set to a global variable.
Thank You for the answers everyone!
How do I make the clock itself?
With numbers?
seconds = time % 60
minutes = int(time/60)
hours = int(time/3600)
Set text to hours & ":" & zeropad(minutes, 2) & ":" & zeropad(seconds,2)
Something like that, off the mind. YMMV
Develop games in your browser. Powerful, performant & highly capable.
I'm having trouble getting the numbers to appear in the text box. Can anyone explain to me how I would go about this in steps?
How would I post my capx so I can get help directly?