View Single Post
  #30  
Old 01-03-2014, 09:13 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by iDigzy View Post
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...

Graal Script 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).
__________________
Reply With Quote