Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-15-2009, 07:08 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
function onPlayerChats() delayed if there is an onTimeout() in the script

It seems that if you have the onPlayerChats() event in a script and an onTimeout() event, there is a slight delay when the function is called. It might be just me, but I'm not sure, so I decided to post it here.

If you have just the following below, the player's chat will be set to "" just fine without any delay.
PHP Code:
function onPlayerChats()
{
  if (
player.chat == "/test")
  {
    
player.chat "";
  }

However, if you have this:
PHP Code:
function onCreated()
{
  
setTimer(.05);
}

function 
onTimeout()
{
  
//doesn't even need code here
  
setTimer(.05);
}

function 
onPlayerChats()
{
  if (
player.chat == "/test")
  {
    
player.chat "";
  }

The above code will have a slight delay for onPlayerChats() to be called.

Well, there is a workaround for this by just putting the onPlayerChats event into a different WNPC, however i'd still like this fixed.
Reply With Quote
 


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 03:14 AM.


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