Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   NPC Synchronisation Error (https://forums.graalonline.com/forums/showthread.php?t=134266802)

ffcmike 07-14-2012 03:41 AM

NPC Synchronisation Error
 
Lets say I have the following NPC with the script:

PHP Code:

function onCreated(){
  
this.setimg("something.png");
  
this.setshape(13232);
  
this.level.flag this;
}

function 
onPlayerTouchsMe(){
  
this.hide();


This correctly hides the NPC to all players within the level.

If a player were to then reconnect, or log in to the same level, they would then see the flag is visible even though on serverside it is invisible.

Trying:

PHP Code:

echo(findplayer("ffcmike").level.flag.visible); 

Echo'd 'false'.

Edit - Actually turns out that I had the setimg(); occurring Clientside, and this is setting the NPC back to visible on the client. So it's quite easy to fix but still a slightly odd behaviour.


All times are GMT +2. The time now is 10:11 AM.

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