Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-30-2007, 01:19 AM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Waitfor?

Hi,

uh i tried using waitfor, ex:

PHP Code:
function onCreated()
  {
  echo( 
"waiting" );

  if( 
waitforthis"onChange") == false ) echo( "timeout" );
  else echo( 
"event" );
  }
  
function 
onChangetest )
  {
  
sendtorc"waiting again" test );

  if( 
waitforthis"onChange") == false) echo( "timeout" );
  } 
now when onChange is called in the 5 secs before the timeout runs out it echoes "event" but but doesnt say "waiting again", how can i make it so it runs the functions too(with the params sent to it)
Reply With Quote
  #2  
Old 12-30-2007, 01:47 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Make it trigger the event after it echos "event"
__________________
Reply With Quote
  #3  
Old 12-30-2007, 12:07 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Quote:
Originally Posted by Inverness View Post
Make it trigger the event after it echos "event"
well, but that discards the "test" param passed to the original trigger, doesnt it?

Quote:
Originally Posted by cbkbud View Post
Do you want something like

scheduleevent( 5, "Change", null );

?

nope
Reply With Quote
  #4  
Old 12-30-2007, 01:58 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by projectigi View Post
well, but that discards the "test" param passed to the original trigger, doesnt it?
Yes, I had an issue with that myself. I simply resorted to using a this. variable.
__________________
Reply With Quote
  #5  
Old 12-30-2007, 02:07 AM
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
Do you want something like

scheduleevent( 5, "Change", null );

?
__________________
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 06:06 PM.


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