Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Waitfor? (https://forums.graalonline.com/forums/showthread.php?t=78129)

projectigi 12-30-2007 01:19 AM

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)

Inverness 12-30-2007 01:47 AM

Make it trigger the event after it echos "event"

cbk1994 12-30-2007 02:07 AM

Do you want something like

scheduleevent( 5, "Change", null );

?

projectigi 12-30-2007 12:07 PM

Quote:

Originally Posted by Inverness (Post 1366730)
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 (Post 1366734)
Do you want something like

scheduleevent( 5, "Change", null );

?


nope

Inverness 12-30-2007 01:58 PM

Quote:

Originally Posted by projectigi (Post 1366808)
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.


All times are GMT +2. The time now is 07:20 PM.

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