
12-16-2003, 08:48 PM
|
|
Somewhat rusty
|
 |
Join Date: Mar 2001
Posts: 5,059
|
|
|
Nope.
You can put scripts into units that are called classes. NPCs can join these classes using the 'join classname;' statement, obviously (which should be put outside of any block). These classes are then linked with the NPCs joining them as if they were a part of the main NPC's script. The NPC can call functions from the class, and the other way around, and events in the class get executed just as if you had placed them directly in the NPC.
The advantage is easier maintenance, and less memory use because code is not duplicated for multiple NPCs. |
|
|
|