Lets say I have the following NPC with the script:
PHP Code:
function onCreated(){
this.setimg("something.png");
this.setshape(1, 32, 32);
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.