PDA

View Full Version : This is stupid but whats the command for....


colin012
03-30-2007, 11:51 PM
What command do I use to make a script loop and not stop as long as the players in the room.

Chompy
03-30-2007, 11:58 PM
while()


Or use timeout

colin012
03-31-2007, 12:12 AM
while()


Or use timeout


Timeout? Never saw that one and while you sure it's gs1

cbk1994
03-31-2007, 12:14 AM
o.O while (true )
would work, but it's better to use a timeout...


if (created)
{
timeout = 0.05;
}
if (timeout)
{
// Do Something
timeout = 0.05;
}

I recommend GS2 though.

Bl0nkt
03-31-2007, 12:15 AM
Timeout? Never saw that one and while you sure it's gs1

while (you_use_gs1) suck++;

Anyway, timeout in GS1:

if (timeout) {
blahblahblah;

timeout=0.05;
}

GS2:

function onTimeout() {
blahblahblah();

setTimer(0.05);
}

The above scripts loops every 0.05 seconds.

colin012
03-31-2007, 12:19 AM
while (you_use_gs1) suck++;

Anyway, timeout in GS1:

if (timeout) {
blahblahblah;

timeout=0.05;
}

GS2:

function onTimeout() {
blahblahblah();

setTimer(0.05);
}

The above scripts loops every 0.05 seconds.

Whats the blah blah part

xXziroXx
03-31-2007, 12:21 AM
Whats the blah blah part

It makes the player say "blah blah blah".

Crow
03-31-2007, 12:21 AM
Whats the blah blah part

The script you want to execute in your loop.

Edit: You are evil Ziro ;o

colin012
03-31-2007, 12:43 AM
The script you want to execute in your loop.

Edit: You are evil Ziro ;o

It doesn't work

Rapidwolve
03-31-2007, 05:02 AM
while (playerscount > 0){
function();
}


GS1

DustyPorViva
03-31-2007, 05:09 AM
while (you_use_gs1) suck++;

Anyway, timeout in GS1:

if (timeout) {
blahblahblah;

timeout=0.05;
}

GS2:

function onTimeout() {
blahblahblah();

setTimer(0.05);
}

The above scripts loops every 0.05 seconds.

Don't you have to call the timeout for that to even begin? Like stated above ^

killerogue
03-31-2007, 05:13 AM
while (playerscount > 0){
function();
}


GS1

What you posted was GS2. :P

And why are you using GS1 anway. :cry:

Bl0nkt
03-31-2007, 07:37 AM
Don't you have to call the timeout for that to even begin? Like stated above ^

I knew I was forgetting something.

killerogue
03-31-2007, 07:54 AM
function onCreated()
{

setTimer(0.05);
}

function onTimeOut()
{

setTimer(0.05);
}


Just felt a need to do that. :P

cbk1994
03-31-2007, 03:26 PM
Here's the GS1.


if (created)
{
timeout = 0.05;
}
if (timeout)
{
/*
Put what you want to loop here.
*/
setplayerprop #c, die; // Make player's chat die every .05 seconds.

timeout = 0.05;
}

Chompy
03-31-2007, 09:49 PM
while (playerscount > 0){
function();
}


GS1

This is probably the best way to do it; timeout is more flexible, but I would prefer while() for this kind of use..

What you posted was GS2. :P

What he posted was GS1 :p

Functions were a part of GS1 :)

colin012
04-01-2007, 04:40 AM
I figured it out I put:

timer=0.1

I fixed it by putting:

timer = 0.1