Quote:
Originally Posted by cbk1994
In the future please use [PHP] tags to format code.
Your trigger is fine except that it looks like you're using the code in an NPC (since you use onPlayerTouchsMe). You can't trigger NPCs the same way you trigger weapons. You would either have to do a triggerAction at the NPC's position, or a fancier trigger (like triggering a weapon or DB NPC).
However, since you're using it in an NPC, you don't even need a trigger. onPlayerTouchsMe gets called serverside, too, so you can just do...
PHP Code:
function onPlayerTouchsMe() {
// you can move this line clientside if you don't want everyone to see
// the chat change
this.chat = player.nick SPC "welcome to Castaway! To get started talk to Brian the skiller outside just outside of here";
player.clientr.tutorial = 1;
}
(if this doesn't work, you may need to set the shape of the NPC serverside by using setShape).
|
Thanks for the quick response

, that seems to work. However if I try to make it work for clientside so only the player sees the chat it does not work. I was wondering if it would make much of a difference if I used player.client.tutorial=1; instead of clientr as client seems to work on clientside. Or would it be better to do a trigger in an npc so it can use clientr?