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.

Newcomers DBPro Corner / Timer problems, any help GREATLY appreiciated!

Author
Message
Sir Ultimos
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location:
Posted: 1st Jun 2003 18:06
First, let me explain what I need a timer for. In my little game, you must cloick on a target, but after about 10 seconds, it'll disappear if it's not clicked. After it's disappered or clicked, it goes to a new location, and everytime it's clicked the time that it takes fop it to disapper decreases by half a second, and it goes on that way until you only have half a second to click the target.

Now, my question. I've tried using both timer commands and trying a get time command and trying to manipulate it, but to no avail. Any help in how to do this "timer" would be much appreciated.
Critters
21
Years of Service
User Offline
Joined: 11th Apr 2003
Location: United Kingdom
Posted: 1st Jun 2003 18:22
erm, I do belive the command is

ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 1st Jun 2003 18:43 Edited at: 1st Jun 2003 18:44
Quote: "erm, I do belive the command is
"


errr.... no, that would make the whole program wait/stop
timer() is the right command to use.


thats what you need i think, its just an example but basically it tells you how longs it waits and that time gradually decreases
if your not sure how to add this to your code just post it here, or if you need more help just ask

ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL mynameisnoneofyourbuisness@hotmail.com to work on the new Star Strike project!!!
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 1st Jun 2003 22:30 Edited at: 1st Jun 2003 22:32
I think this should work.


I hear and I forget. I see and I remember. I do and I understand.
Sir Ultimos
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location:
Posted: 2nd Jun 2003 00:08 Edited at: 2nd Jun 2003 00:42
Thanks for the help, but it still won't disappear after ten seconds, and it doesn't get slower.

Here's my code with your code inserted



Sir Ultimos
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location:
Posted: 2nd Jun 2003 00:48 Edited at: 2nd Jun 2003 00:52
Message Deleted

Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 2nd Jun 2003 01:55
Doesn't my code work at all? Haven't tried it myself, it's all theory.

I hear and I forget. I see and I remember. I do and I understand.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 2nd Jun 2003 02:15
Altered my code to work better, but it doesn't seem to work, wonder why...



I hear and I forget. I see and I remember. I do and I understand.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 2nd Jun 2003 02:57
Fixed, if you have set "sync on" else where then you will need to uncomment the sync so it shows the text.
Sir Ultimos
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location:
Posted: 2nd Jun 2003 04:12
Nilrem-Your code doesn't work either.

the_winch-The sync is a remark.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 2nd Jun 2003 07:56
Sir Ultimos,

this method will allow you to scale it for more timers.

I think you can adapt this to what you need.

the white box will dissapear after 5 seconds.
pressing [p] will reactivate it.



indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 2nd Jun 2003 07:59
tested in DBP only, I just tried it in Classic and it throws some errors but could be adpatable.

ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 2nd Jun 2003 19:16
your game works fine for me, it dissapears without clicking and the time gets shorter everytime if dissapears or is clicked on. so its fine in db classic

ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL mynameisnoneofyourbuisness@hotmail.com to work on the new Star Strike project!!!
Sir Ultimos
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location:
Posted: 3rd Jun 2003 00:33 Edited at: 3rd Jun 2003 00:37
Weird, won't work in my DBC, and the first time I tried it in DBC, it worked, but it wouldn't again after that. Any suggestions?

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 3rd Jun 2003 03:15
here is a classic version that works in 113



ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 3rd Jun 2003 20:01
what version of db do you have???

ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL mynameisnoneofyourbuisness@hotmail.com to work on the new Star Strike project!!!
Sir Ultimos
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location:
Posted: 6th Jun 2003 01:14
Dark Basic Classic.

Login to post a reply

Server time is: 2024-11-24 17:07:51
Your offset time is: 2024-11-24 17:07:51