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 / Racing problems

Author
Message
BENOJ
19
Years of Service
User Offline
Joined: 17th Mar 2006
Location: UK
Posted: 4th Apr 2006 21:53
this is probably really simple, but i just cant think of hwo to do it,
i am making a race game, and i want a NOS button that can only last for 5 seconds, and that is it. I have been trying to use the timer() function with no avail. Could anyone help out

abit fatal1ty an8 sli mobo, ati radeon 1800 XT, 1.5GB RAM
250GB SATA HDD, AMD Athlon 64 x2 4200 (overclocked further)
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 4th Apr 2006 22:17
Before the loop,

inside the loop



At least farting ferrets are better than stinky stoats.
BENOJ
19
Years of Service
User Offline
Joined: 17th Mar 2006
Location: UK
Posted: 5th Apr 2006 00:52 Edited at: 5th Apr 2006 01:19
thanks that works fine could you explain it though, becasue i thought if old timer was= to timer() and then if the timer() were in the same loop then that would = nothing, so therefore nos would stay the same

abit fatal1ty an8 sli mobo, ati radeon 1800 XT, 1.5GB RAM
250GB SATA HDD, AMD Athlon 64 x2 4200 (overclocked further)
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 5th Apr 2006 21:09
No, because the oldtimer is not updated until the next sync, and you are therefore getting the timer ticks since the last sync.


At least farting ferrets are better than stinky stoats.
BENOJ
19
Years of Service
User Offline
Joined: 17th Mar 2006
Location: UK
Posted: 5th Apr 2006 23:36
ok so how come the first timer is updated?
is that simlpy becauseit is before the oldtimer and therefore has a different time? and if sso how can i garuntee that this wil work on every pc as the syncrate is always different

abit fatal1ty an8 sli mobo, ati radeon 1800 XT, 1.5GB RAM
250GB SATA HDD, AMD Athlon 64 x2 4200 (overclocked further)
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 7th Apr 2006 22:41
No.

Oldtimer = timer()

render stuff (a wait)

timer()

oldtimer() = timer

render stuff (a wait)

timer()


At least farting ferrets are better than stinky stoats.

Login to post a reply

Server time is: 2025-05-24 02:00:27
Your offset time is: 2025-05-24 02:00:27