View Single Post
  #7  
Old 06-07-2003, 03:25 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by GrowlZ1010
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;

with (getnpc(localnpc_growlzblank_14777372_0))

you can actually do that? o_O never knew
and stefan said he is going to make a way to convert putnpc2 npcs to DB NPCs (on the npc list) and a way to rename them when I asked him about this a week ago, need to remind him to do it
Reply With Quote