Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply


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 06:08 PM.


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