View Single Post
  #6  
Old 06-07-2003, 12:33 AM
TripleE TripleE is offline
Down with GK Corruption
Join Date: Jun 2003
Posts: 1,005
TripleE 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;

That's pretty clever to think up. I guess it would also be easier to find stuff,because you wouldnt need to remember all those serial sting numbers. Nice Growlz
Reply With Quote