3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Make hour countdown  (Read 101 times)

« on: April 28, 2014, 02:28:15 PM »
Hi, im trying to make a time countdown like this:

http://www.3drad.com/forum/index.php?topic=8617.0

But i need do that with a valueprint, i used iSystemTime and it works fine, but i don't need the current time ;D.
See my web:
« Reply #1 on: April 28, 2014, 04:08:19 PM »
I see your question as asking 2 things.

How to count to a given date.

And not using iPrint() but use value print OBJ instead.

Problem is, value print doesn't seem to allow formatting other then the number of decimal places to display.

so to get 15:34:42, you would need to combine a text display & the value print.

If your gonna use a text display( i think you need to to get the display you want) you can use the text print object for the whole display and it allows formatting, so you'll get the desired time display .

The way i like to do this is by using
Code: [Select]
iObjectTextSet(OBJ_X,string);this will solve all your time display requirements and can be formatted as needed, cause the time will be formatted as a string first, then displayed.

To preform the actual count down you just do a string comparison of the current time and the desired time, when they match, your time has been reached.

This may sound complicated but it's actually easy to set up.

In my current project i actually have a timer routine that is adjustable with the mouse scroll wheel, and allows 1,5,15,30,60 minutes to be selected.

That time is displayed and even animated on screen by adding a print off-set to the X location, and recycling that value.

Have covered your problem enough ?.

PS Jestermons pretty much is what you wanna do..

I can throw together a similar project, that will output the data pretty much the same way. so it really wont serve any purpose, other then to rewrite what jestermon has already done, and which you would need to change anyway to fit your project and display needs.

If just rewriting jestermons script to use value print.. it will become a little messy, when really it is doing all that you need already.
« Last Edit: April 30, 2014, 06:20:33 PM by TinSoldier »
« Reply #2 on: April 28, 2014, 05:09:19 PM »
I see. I was testing iObjectTextSet with something like this:

Code: [Select]
if(minute == 55) iObjectTextSet(OBJ_0,"Hola");
And when the time reach that 55 minutes the textprint change to "Hola"(Hi in spanish, just in case ;D). But i need a string to show that text or start/stop something, but when the numbers (marked on the picture) reach 0.



Of course, i won't use days or hours to test :P, i will modify the script later but i need see how do what i need


« Last Edit: April 28, 2014, 05:11:05 PM by Facujk101 »
See my web:
« Reply #3 on: April 28, 2014, 07:48:09 PM »
this should do what you want.
« Last Edit: April 30, 2014, 06:21:40 PM by TinSoldier »
Pages: [1]