Page 1 of 1

While and If

PostPosted: Sat Nov 24, 2007 10:09 pm
by asmodeus
What's the different from while and if the script editor?

Re: While and If

PostPosted: Sun Nov 25, 2007 4:49 am
by pixelpoop
I believe "While" statements will keep looping back through the code within the current frame while the condition exists. It could be possible that the condition is never met and the computer keeps rereading the code (never advancing to the next frame) and then crash.

An "if" statement only checks the condition once and then goes on.

Re: While and If

PostPosted: Sun Nov 25, 2007 9:26 am
by Fuzzy
Its also possible that a while never executes at all. If its important that it does, you should use a for loop

Re: While and If

PostPosted: Sun Nov 25, 2007 11:58 am
by Kalladdolf
is there also a funtion called "wait"?
I know in lite-c there it is, saying
Code: Select all
wait(1);

(tells the computer to wait 1 frame)

Re: While and If

PostPosted: Mon Dec 17, 2007 6:19 pm
by Kalladdolf
um... this was a question.

Re: While and If

PostPosted: Tue Dec 18, 2007 12:39 am
by Game A Gogo
no

Re: While and If

PostPosted: Wed Jan 02, 2008 8:27 pm
by Kalladdolf
something similar?
I know that in lite-c "wait()" exists...
but how about GE?

Re: While and If

PostPosted: Thu Jan 03, 2008 12:15 am
by Game A Gogo
It doesn't have it, if you check in the GE Documentation, it does not have it.

Re: While and If

PostPosted: Thu Jan 03, 2008 7:12 pm
by Kalladdolf
:(

Re: While and If

PostPosted: Thu Jan 03, 2008 7:19 pm
by Bee-Ant
generally...
Code: Select all
do
{
    //something
}
while
{
   //the limit to do
}