Quote:
Originally Posted by cbk1994
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".