![]() |
Duplicate an NPC
Hey everyone, just got a quick question, is there a function for duplicating an NPC? I thought about putnpc2 but that wouldn't copy the code of the first NPC.
Also I can't use classes, I need to be able to duplicate it without the use of classes. |
There's no way to duplicate an NPC without resorting to hackish methods (reading the NPC's code from the npcs folder), which I would advise against.
Can you describe what you're trying to do? If you tell us what you're trying to accomplish we might be able to give you better advice. |
The use of classes ideal for re-using the same code...
|
The only proper way to do what you want is with putnpc2, and you can pass whole scripts to putnpc2:
putnpc2(x, y, "script"); |
You're going to have a tough road ahead if you're sticking to level NPCs and not classes.
|
I understand what you mean, but I was asked to script an NPC which could do that WITHOUT the use of classes. Anyway it seems there was no simple way to do that so end of thread.
|
Well tell us why exactly you feel that you're restricted to not using classes?
There's likely to be a workaround that you're not aware of. |
| All times are GMT +2. The time now is 08:59 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.