![]() |
Command for class NPCs: "rename"
NPC Code: Since classes can be accessed with the getnpc statement and their cryptic NPCServer internal code number - usually looking something like localnpc_growlzblank_14777372_0 - shouldn't it be possible to rename them to something coherent? For example, giving a NPC a serial number: NPC Code: You could then do with (getnpc(Sign 2210)) instead of having to use something obscure like localnpc_signtest_33712039_4. This way, scripts could write their serial number to a string list on a DB NPC (no more having class NPCs somebody else laid but that you can't locate), and the database could even send them information about other class NPCs. |
Class NPCs? Using getnpc to get classes? Wha? Classes are just chunks of code, they can't exist independently.
|
Quote:
|
Are you talking about those created via putnpc2?
|
Quote:
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: |
Quote:
|
Quote:
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 |
| All times are GMT +2. The time now is 09:53 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.