![]() |
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:
PHP Code:
Well, there is a workaround for this by just putting the onPlayerChats event into a different WNPC, however i'd still like this fixed. |
Yeap, I noticed this several times, I just got used to putting playerchat events in an entirely different script.
I'd love to see this fixed. |
Quote:
|
Could you make some tests, printing the time when the onPlayerchats() event is invoked, with two weapos one with timeout one without?
|
I can also confirm this happens.
Though, as a side note, you can use ChatBar.onAction() and you should be able to catch it before the player chats. |
Quote:
|
Hmmm it might indeed be a problem of ChatBar.onAction(), which is handled by the -Serverlist script which is then invoking an onPlayerChat event. Scripts that are already active (timeout) receive the event but since their onTimeout was already executed they will have to wait until the next frame. This is not a perfect situation but normally for chat commands it's not important to be executed 0.05 seconds sooner or later, so the question is if this need to be fixed? It might be a bigger problem for other cases, like triggers.
|
Quote:
PHP Code:
Just like on GK now, /commands only clear clientside, everyone serverside can still see what you said. There are of course other problems resulting from this, I think it would be great to have it fixed. It would also be neat to see clientside timeouts sped up a little bit to handle faster times in the new client. |
For making chat disappear (Tig's problem), you can use either
PHP Code:
|
| All times are GMT +2. The time now is 01:10 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.