View Single Post
  #9  
Old 02-09-2011, 03:58 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by cbk1994 View Post
PHP Code:
function onToggleVis(mode) { 
  
this.visible mode
  
this.trigger("update");

I haven't read every post in this thread but have you tried that?
Normally you don't need that, since he is triggering the npc anyway (triggering is waking it up).
On server-side to change some other npc you normally have to:
npc.visible = false;
npc.trigger("updateorso","");

That sets the visibility to false and is also waking up the npc so that the new attributes are sent to the clients.

The original code looks a little bit fishy to me though, you are hiding when you pass "true" and show when you pass "false"? That can confuse the one who is calling the function and thinks it will actually show when you call it with parameter "true".
Reply With Quote