Quote:
Originally Posted by iDigzy
It's been a while since I've run into another problem while learning, but I am currently stuck on making a trigger to set the clientr of a player. I have tried a few things with no luck. Would anyone be able to tell me what is wrong with this?
|
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).