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.

emortylone 05-01-2002 07:58 PM

Simple Trig? WTF< are you like a mathmatician or something? LOL, the highest i'm gonna hit in high school is calculus, and the pre-calculus stuff scares me! HEh
---Shifter

emortylone 05-01-2002 09:05 PM

Heh, that would be why you're such a good scripter! It is mostly mathmatics once you get down to it! I am usually a pretty good math student, i'm in Geometry right now, Algebra 3-4 next year
---shifter

adam 05-02-2002 03:04 AM

Actually im not all to sure myself exactly how the numbers ended up complex. I don't recall any sqrt( - numbers)


Apparently inductors and capacitors in circuits result in complex numbres.
Something about being 90 degree's out of phase with the rest of the circuit.

and that makes them complex I guess.


i'ts like resister resistance + capacitor reactance


100 ohms + j100 ohms. and in electronics we use j instead of i for complex numbers.

and we do polor notation.
141.42 ohms at angle 45 degree's.


All times are GMT +2. The time now is 08:35 PM.

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