View Single Post
  #1  
Old 07-14-2012, 03:41 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
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.

Last edited by ffcmike; 07-14-2012 at 03:56 AM..
Reply With Quote