Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Timeout Cancel (https://forums.graalonline.com/forums/showthread.php?t=27606)

Googi 04-17-2002 03:01 AM

Timeout Cancel
 
Is there a way to cancel a timeout?

Kinda like this...

NPC Code:

if (this.onea=0){
//code that cancels the timeout
}


Loriel 04-17-2002 03:06 AM

timeout = 0;
sleep 0;
timeout = 10^999; (doesn't exactly cancel, but you get the point)

Gohan43331 04-17-2002 03:32 AM

Inside the timeout loop:

NPC Code:

if (this.onea!=0) timeout = .1;



That will make it so when this.onea is 1, it will continue to timeout

Saga2001 04-17-2002 03:04 PM

Quote:

Originally posted by Loriel

timeout = 10^999; (doesn't exactly cancel, but you get the point)

LOL, never thought of doing that. :-P, maybe you could return an unreal number as a timeout, lol.

SaijinGohan 04-18-2002 10:52 PM

an imaginary number would be cool.

Kadar 04-18-2002 10:55 PM

timeout = 0;
^ turns teh timout offfff

SaijinGohan 04-18-2002 11:03 PM

an imaginary number would be cool.

Slaktmaster 04-19-2002 12:35 AM

Scriping underpants and SSJ race perhaps?

Why use timeout = 10^999; when you can use timeout = 0;?

Saga2001 04-19-2002 04:42 AM

Quote:

Originally posted by Slaktmaster
Scriping underpants and SSJ race perhaps?

Why use timeout = 10^999; when you can use timeout = 0;?

:p cause it owns u! <3

Mustang1988 04-21-2002 02:45 AM

Quote:

Originally posted by Slaktmaster
SSJ race
I GET TO BE SSJ6 GOKU!

I WILL KAMEHAMEHA YOU.

mikepg 04-21-2002 10:19 PM

umm
 
you can cancel at time out like this:


if (timeout) {
if (clause) {this.timeagain = 0; sleep .1;
}

if (this.timeagain>0) {timeout = .1;
}
}

sleep will terminate a timeout until another command calls it. Or atleast it used to ;). It should work, because for me, sleep nulls timeout if I don't call timeout again.

emortylone 04-29-2002 08:30 PM

Quote:

Originally posted by Kaimetsu


What could you possibly use them for in Graal?

What could you possibly use them for at ANY! time!??
---Shifter
i h8 higher math, heh.

emortylone 04-30-2002 08:19 PM

Don't say such big words, you're going to shatter my brain! LOL! Really, 99% +0.9999999999999999(repeating)% of people will never never UNDERSTAND let alone USE them!
---Shifter

adam 05-01-2002 01:15 PM

We use them in electronics constantly.

adam 05-01-2002 02:10 PM

Hmm... Not sure. There is still lot's of electronics ahead of me. It is entirely possible.


Im only 3/5'th through AC electronics. So far we've used complex numbers almost every day. It's all right triangle math and stuff. Lot's of trig.


All times are GMT +2. The time now is 12:42 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.