Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Incorrect wait(-time) #124823
04/18/07 10:10
04/18/07 10:10
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline OP
Serious User
vlau  Offline OP
Serious User
V

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 Offline
Senior Member
Bot190  Offline
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: Bot190] #124825
04/18/07 10:36
04/18/07 10:36
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline OP
Serious User
vlau  Offline OP
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Nupe

Quote:


time - number of frames when positive, time in seconds when negative (-1000 .. +1000).





Quoted from the manual, but thanks.

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 Offline
User
tompo  Offline
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: vlau] #124827
04/18/07 15:02
04/18/07 15:02
Joined: Nov 2000
Posts: 1,534
hamburg
Samb Offline
Serious User
Samb  Offline
Serious User

Joined: Nov 2000
Posts: 1,534
hamburg
write before the "ready" thing "fps_max=60;" and everything will work fine

Re: Incorrect wait(-time) [Re: Samb] #124828
04/18/07 20:18
04/18/07 20:18
Joined: May 2006
Posts: 398
Bot190 Offline
Senior Member
Bot190  Offline
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
V
vlau Offline OP
Serious User
vlau  Offline OP
Serious User
V

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: vlau] #124830
04/20/07 07:00
04/20/07 07:00
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline
Serious User
LarryLaffer  Offline
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
try it without the error commands, like the example tompo wrote. "error()" opens up a new window, and you don't know what happens there between the scenes. The function scheduler may freeze while the error window is up, or maybe the other way around.. anyway, that looks like what's causing it. wait(-x) works great here as well.

ps: wait uses time, so it shouldn't be the frame_rate thing. I've used wait() a lot in my games, and nothing ever goes out of sync or anything when I change frame-rates or try on slower machines


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: Incorrect wait(-time) [Re: LarryLaffer] #124831
04/20/07 08:06
04/20/07 08:06
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline OP
Serious User
vlau  Offline OP
Serious User
V

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.

Re: Incorrect wait(-time) [Re: vlau] #124832
04/20/07 08:35
04/20/07 08:35
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline
Serious User
LarryLaffer  Offline
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Oh, then.. I got no idea...

I can only say that it works correctly here. Hope conitec answers you soon


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1