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 Dilemma

Author
Message
shelim
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 5th Apr 2008 12:33
I have 2 timers,

(Timer A)If A<Timer() Then A=Timer()+1 :
(Timer B)If B<Timer() Then B=Timer()+300 :

Now i want be able to change these two timer once the program is running, by giving the user a box to type in the change they want to make e.g.+40,200,400etc.
Also can anyone tell me how to set the code so that if i multiply by 2 then it would be twice as fast as the other timer or if i decide to multiply by 0.97 then it would be 0.97 times faster in the other timers etc.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 5th Apr 2008 18:05
To make it simple, you could use the input command.

On the second part, I'm not entirely sure what you mean?
You could have sleep standard value / timerValue, if you want to make it such as that a value of 2 on timerValues makes the execution twice as fast (approximately, theoretically as you postpone the processing for half the default time).

"I kören hörs de brummande busarna Björnligan och Gondolen"
shelim
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 5th Apr 2008 22:10
please give an example of how it would be done
shelim
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 5th Apr 2008 22:15
and also how do you create a box in the program for the input commands
calcyman
17
Years of Service
User Offline
Joined: 31st Aug 2007
Location: The Uncertainty Principle
Posted: 8th Apr 2008 12:05
http://forum.thegamecreators.com/?m=forum_view&t=127367&b=1&p=0#m1470038

I've alreasy answered it

The optomist's right, The pessimist's right.

Login to post a reply

Server time is: 2024-11-25 06:47:05
Your offset time is: 2024-11-25 06:47:05