View Single Post
  #22  
Old 09-03-2012, 06:15 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by cbk1994 View Post
Yes. A putnpc is just a more temporary database NPC. If you know an NPC's name, you can easily trigger it:

PHP Code:
triggerServer("npc"npc.attr[2], "poke"); 
note that the npc's name isn't available clientside (iirc) so you'll need to stuff it in an attribute or similar so that you can access it clientside (just do this.attr[2] = this.name serverside in onCreated).

Now you no longer have to worry about shapes or overlapping or any of that other junk.
Interesting to know, thanks. However, didn't you say there would be a better way then using triggeractions to do this? Because I'm not sure what you would be referring to. Unless you ment "triggeraction" being changed to "triggerserver" ?

And rather then a new thread for a 2 second fix, I have the above code also setting a variable after joining:

PHP Code:
temp.obj.placedby player.account
The variable reads serverside from the class, but not clientside. Any idea other then a serverside to clientside trigger?

It seems attr's work but was wondering if theres any other way.

Last edited by scriptless; 09-03-2012 at 07:15 PM..
Reply With Quote