![]() |
Editing a local NPC
How would I go the way of editing local npcs from a level. I had tried changing the layer of one in clientside but only changed for me and no one else.
I tried doing in serverside but the layer wouldn't change. I had the npcs chat change to the layer it was in and it was chatting correctly but the layer wouldn't actually change. |
open the level in texteditor and change it manually
|
hello!
this is probably a case of the 'layer' variable not synchronising from serverside to clientside, you could try either setting it via drawunderplayer()/drawoverplayer() or by triggering its change using npc.trigger('Event', params...); |
So I got it to work some what. In class that the npc is joined to I have
PHP Code:
|
Unfortunately you can't trigger clientside like that (it would need to copy the trigger to every player in the level). The best way I remember solving these kind of issues is using a timeout to check an attr, sadly.
You could also hack it by triggering a weapon clientside on each player in the level, but that feels kind of bad too. You can't do point-triggers to clientside, though. edit: nevermind, this entire post is wrong, see below |
Chris' method of using attr w/ a timeout makes the most sense.
|
Quote:
PHP Code:
Quote:
|
Quote:
|
Quote:
|
Got it to work!! thanks so much!!
|
| All times are GMT +2. The time now is 05:27 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.