|
|
Incorrect wait(-time)
#124823
04/18/07 10:10
04/18/07 10:10
|
Joined: Aug 2005
Posts: 1,558 HK
vlau
OP
Serious User
|
OP
Serious User
Joined: Aug 2005
Posts: 1,558
HK
|
I've test wait(-time) with the following simple script: Code:
function main() { error("Ready"); wait(-10); error("Times up"); }
When I click OK to start waiting, it display the diagloue "Times up" after a second not 10. I've tried different value such as -5, -20, -30... none of them "wait" correctly, I've also test the above codes in lite-C, it takes only 4 seconds. Is it a bug or it just happen to my PC?
|
|
|
Re: Incorrect wait(-time)
[Re: vlau]
#124824
04/18/07 10:30
04/18/07 10:30
|
Joined: May 2006
Posts: 398
Bot190
Senior Member
|
Senior Member
Joined: May 2006
Posts: 398
|
um i think you should take out - i highlighted it with red. just a thought. code function main() { error("Ready"); wait( -10); error("Times up"); }
Wait, there isn't a "Make My Game Now" button?
|
|
|
Re: Incorrect wait(-time)
[Re: vlau]
#124826
04/18/07 11:00
04/18/07 11:00
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
User
|
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
I've wrote simple function and everything works fine. I mean if I'll write -1 program waits one second, if -10 10seconds... etc Code:
var number; panel helper { digits = 20, 20, 3, digit_font, 1,number; flags REFRESH,visible; }
function countdown { while(1) { number -=1; wait(-10); } }
Last edited by tompo; 04/18/07 11:03.
Never say never.
|
|
|
Re: Incorrect wait(-time)
[Re: Samb]
#124828
04/18/07 20:18
04/18/07 20:18
|
Joined: May 2006
Posts: 398
Bot190
Senior Member
|
Senior Member
Joined: May 2006
Posts: 398
|
ok. it was just a guess. i haven't seen it done that way so.
Wait, there isn't a "Make My Game Now" button?
|
|
|
Re: Incorrect wait(-time)
[Re: Bot190]
#124829
04/20/07 06:38
04/20/07 06:38
|
Joined: Aug 2005
Posts: 1,558 HK
vlau
OP
Serious User
|
OP
Serious User
Joined: Aug 2005
Posts: 1,558
HK
|
Quote:
write before the "ready" thing "fps_max=60;" and everything will work fine
Thanks for the info. Hope that will have other solution for different frame rate both in window and fullscreen mode.
|
|
|
Re: Incorrect wait(-time)
[Re: LarryLaffer]
#124831
04/20/07 08:06
04/20/07 08:06
|
Joined: Aug 2005
Posts: 1,558 HK
vlau
OP
Serious User
|
OP
Serious User
Joined: Aug 2005
Posts: 1,558
HK
|
Hi Larry, I've tried it without using error command before posting this thread, but the result is the same. Here is another code similar to the example from the menu : Code:
action theGuard { my.ambient = 100; wait(-5); my.ambient = 0; }
It takes only a second to turn ambient from 100 to 0.
|
|
|
|