Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   While (https://forums.graalonline.com/forums/showthread.php?t=20882)

BlKnight 01-11-2002 06:03 AM

While
 
Stefan, you need to make while like this:
Instead of it being in a event to work, make it so it works indepentdantly. So lets say I have a variable on. A different NPC sets on to 1. Another NPC has it so while(on=1) {script}, the other NPC has no other script either. SO basicly it actively checks when on = true, and when on = false it stops.

I thought that was in there already, but I'm posting this, so learned otherwise.

mikepg 01-11-2002 10:55 AM

umm
 
I think it already works like that...try using timeouts and while statements


//NPC 1

if (flag) {on=1;
}
if (flag) {on=0;
}
(Keep in mind, some flags are not called like playerchats)

//NPC 2

if (timeout) {
while (on=1) {stuff;
}
timeout = .05;
}
since while is continuous (sp), it doesnt matter if it is called over and over. Your better off not using while anywayz

BlKnight 01-11-2002 02:10 PM

Re: umm
 
Quote:

Originally posted by mikepg
I think it already works like that...try using timeouts and while statements


//NPC 1

if (flag) {on=1;
}
if (flag) {on=0;
}
(Keep in mind, some flags are not called like playerchats)

//NPC 2

if (timeout) {
while (on=1) {stuff;
}
timeout = .05;
}
since while is continuous (sp), it doesnt matter if it is called over and over. Your better off not using while anywayz

You think, genius? Didn't I say "without timeouts"? Well I did now.

Juron Pilo 01-16-2002 12:20 PM

you totally missed the meaning behind the while statement...

Saga2001 01-16-2002 02:12 PM

great idea...lol
its so good, its already been done, lol.


All times are GMT +2. The time now is 10:49 PM.

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