Thread: putnpc/putnpc2
View Single Post
  #4  
Old 01-17-2002, 12:16 AM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Re: hmm

Quote:
Originally posted by mikepg
okay, so, if it's clientside, it affects the player that placed it, if it's server side, it affects the 1st player in the level?

What about join? If you call an NPC using putnpc2, and use join, while in client side, will that not function, or will it work fine and effect the caller of the npc.

ex:
//#CLIENTSIDE
if (this.blah = 0) {
putnpc2 {join scriptname.txt};
}

or does join ONLY work if it's in a server side section?
putnpc2 only works on the serverside. But you can do stuff like:
NPC Code:
if (actionserverside) {
putnpc2 playerx,playery,{join whatever;};
with (npcs[npcscount-1]) {
this.playerx=playerx;
this.playery=playery;
}
}
//#CLIENTSIDE
if (weaponfired) triggeraction x,y,serverside,WeaponName,;

The setting of the variables is performed before the created of the NPC put wih putnpc2.
__________________

Reply With Quote