View Single Post
  #5  
Old 06-07-2003, 12:12 AM
GrowlZ1010 GrowlZ1010 is offline
defunct
Join Date: May 2002
Posts: 187
GrowlZ1010 is on a distinguished road
Quote:
Originally posted by Kaimetsu
Are you talking about those created via putnpc2?
Yup.

A NPC created with putnpc2 is stored with a long and complicated internal ID string as pointed out in my first post. I'm suggesting a way to change that string to something sensible, like a serial number to call the NPC by.

For example, here's a weapon script that gets one of my Drone NPCs (created with putnpc2) - temporary NPCs that can be used to block rooms etc. and have unique ID numbers - and gives it new text; however, at the moment, there's no way of getting the NPC's ID string without using the NPC-Control, and to get its string with that requires you to know where it is!

NPC Code:

if (actionserverside){
setstring this.reply,Couldn't find the NPC;
with (getnpc(localnpc_growlzblank_14777372_0)){
setstring this.msg,ZIYEHOY!;
setstring thiso.reply,Gottum, sir!;
}
setplayerprop #c,(#s(this.reply));
}
//#CLIENTSIDE
if (weaponfired) triggeraction 0,0,serverside,TempTest;

Reply With Quote