Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-30-2007, 10:51 PM
colin012 colin012 is offline
That never happened...
colin012's Avatar
Join Date: Feb 2006
Location: Under your bed.....
Posts: 321
colin012 is on a distinguished road
This is stupid but whats the command for....

What command do I use to make a script loop and not stop as long as the players in the room.
__________________
Dude! It's a skirt...
Quote:
Originally Posted by Elizabeth View Post
Good lord it looks potent...
Reply With Quote
  #2  
Old 03-30-2007, 10:58 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
PHP Code:
while() 
Or use timeout
__________________
Reply With Quote
  #3  
Old 03-30-2007, 11:12 PM
colin012 colin012 is offline
That never happened...
colin012's Avatar
Join Date: Feb 2006
Location: Under your bed.....
Posts: 321
colin012 is on a distinguished road
Quote:
Originally Posted by Chompy View Post
PHP Code:
while() 
Or use timeout

Timeout? Never saw that one and while you sure it's gs1
__________________
Dude! It's a skirt...
Quote:
Originally Posted by Elizabeth View Post
Good lord it looks potent...
Reply With Quote
  #4  
Old 03-30-2007, 11:14 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
o.O while (true )
would work, but it's better to use a timeout...

PHP Code:
if (created)
{
timeout 0.05;
}
if (
timeout)
{
// Do Something
timeout 0.05;

I recommend GS2 though.
__________________
Reply With Quote
  #5  
Old 03-30-2007, 11:15 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by colin012 View Post
Timeout? Never saw that one and while you sure it's gs1
while (you_use_gs1) suck++;

Anyway, timeout in GS1:

PHP Code:
if (timeout) {
  
blahblahblah;
  
  
timeout=0.05;

GS2:

PHP Code:
function onTimeout() {
  
blahblahblah();

  
setTimer(0.05);

The above scripts loops every 0.05 seconds.
Reply With Quote
  #6  
Old 03-30-2007, 11:19 PM
colin012 colin012 is offline
That never happened...
colin012's Avatar
Join Date: Feb 2006
Location: Under your bed.....
Posts: 321
colin012 is on a distinguished road
Quote:
Originally Posted by Bl0nkt View Post
while (you_use_gs1) suck++;

Anyway, timeout in GS1:

PHP Code:
if (timeout) {
  
blahblahblah;
  
  
timeout=0.05;

GS2:

PHP Code:
function onTimeout() {
  
blahblahblah();

  
setTimer(0.05);

The above scripts loops every 0.05 seconds.
Whats the blah blah part
__________________
Dude! It's a skirt...
Quote:
Originally Posted by Elizabeth View Post
Good lord it looks potent...
Reply With Quote
  #7  
Old 03-30-2007, 11:21 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by colin012 View Post
Whats the blah blah part
It makes the player say "blah blah blah".
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #8  
Old 03-30-2007, 11:21 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by colin012 View Post
Whats the blah blah part
The script you want to execute in your loop.

Edit: You are evil Ziro ;o
Reply With Quote
  #9  
Old 03-30-2007, 11:43 PM
colin012 colin012 is offline
That never happened...
colin012's Avatar
Join Date: Feb 2006
Location: Under your bed.....
Posts: 321
colin012 is on a distinguished road
Quote:
Originally Posted by Crow View Post
The script you want to execute in your loop.

Edit: You are evil Ziro ;o
It doesn't work
__________________
Dude! It's a skirt...
Quote:
Originally Posted by Elizabeth View Post
Good lord it looks potent...
Reply With Quote
  #10  
Old 03-31-2007, 04:02 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
PHP Code:
while (playerscount 0){
   function();

GS1
Reply With Quote
  #11  
Old 03-31-2007, 04:09 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Bl0nkt View Post
while (you_use_gs1) suck++;

Anyway, timeout in GS1:

PHP Code:
if (timeout) {
  
blahblahblah;
  
  
timeout=0.05;

GS2:

PHP Code:
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 ^
Reply With Quote
  #12  
Old 03-31-2007, 04:13 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Rapidwolve View Post
PHP Code:
while (playerscount 0){
   function();

GS1
What you posted was GS2. :P

And why are you using GS1 anway.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #13  
Old 03-31-2007, 06:37 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by DustyPorViva View Post
Don't you have to call the timeout for that to even begin? Like stated above ^
I knew I was forgetting something.
Reply With Quote
  #14  
Old 03-31-2007, 06:54 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
PHP Code:

function onCreated()
{

  
setTimer(0.05);
}

function 
onTimeOut()
{

  
setTimer(0.05);

Just felt a need to do that. :P
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #15  
Old 03-31-2007, 02:26 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Here's the GS1.

PHP Code:
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;

__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:41 PM.


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