Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Getting a number to update on the screen

Author
Message
Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 10th Nov 2005 10:25
Help! I need to make a number automatically update in a box on the screen, e.g. items collected, or time left, but using the sync command, it just pastes the number over the old one, without removing it. Also, how can you change the backdrop depending on what time of day it is, i.e. running the game on the computer clock?

(does this make sense? probably not!)

I am a Christian and I know that God loves me. That is what makes my life so great!
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 10th Nov 2005 10:38 Edited at: 10th Nov 2005 10:40
set text opaque

get the system time and then just get the hour for example

a$=get time$()

hour=val(time$) <<< returns the first number up to the colon

then just use the hour value to alter the background, either gradualy or suddenly, eg if you have a skysphere

texture object skysphere,hour <<<where you have images from 1 to 24 for the hour

you can get more segments of the time with the correct string commands if you want more precision, just use left$ to strip off the first three digits (the hour and colon), then get the minutes the same way you got the hours.



if there is one thing I can NOT tolerate, it`s intolerant people.
Halo Man
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location:
Posted: 10th Nov 2005 13:55
Im sort if a noob, but can't you maybe use the "cls command"?

~Zap Productions~
Current Project: Battlegrounds I
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 10th Nov 2005 16:49
or you can redraw the box every loop. It will erase the previous number wich you wrote on the box.

Immunity and Annihalation makes Immunihalation...
Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 11th Nov 2005 11:37
Cheers everyone. For some reason, within a few hours of posting the original message, the sync command started working. (That seems to sum up the luck I have with computers, adding to the fact that I strained knee ligaments last week by sitting down at my computer! First the computer breaks, then I break because of the computer!)lol.

I am a Christian and I know that God loves me. That is what makes my life so great!
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 12th Nov 2005 00:38
Yah, I ripped my knee ligaments at a soccer games. It hurts SOOOOOOOOOOOOOOOOOOOOOOOOOOOO badly. Hope you feel better and hope your game goes along great!

Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 14th Nov 2005 10:41
Thanks, dabip_______vgm. By the way, interesting forum name! I guess that injuring my knee was a blessing, in a way. Now I can sit around at home, working on my game!

I am a Christian and I know that God loves me. That is what makes my life so great!
Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 28th Nov 2005 11:56
update on my knee problem, not that anyone would be interested, but i'll post anyway...

DISLOCATED KNEECAP! AAAARRGH! (just by sitting down! goes to show that doing even the most simple of things can prove painful!)

I am a Christian and I know that God loves me. That is what makes my life so great!

Login to post a reply

Server time is: 2025-05-22 19:30:42
Your offset time is: 2025-05-22 19:30:42