PNPC.lua

Download Latest Version

pNPC is a library for getting a wrapper object for NPC class objects LunaLua, which unlike those remains valid across ticks.

For extra utility it also provides a uid and a property for user-defined data storage.

Installation
Place the file pnpc.lua in either your level's custom graphics folder for use in a level, along with a lunadll.lua file, or in the same directory as your .wld file along with a lunaworld.lua file for use throughout an entire episode.

How to use
To enable the pNPC library for a specific level, add this line to lunadll.lua: This will load the pNPC API.

External Use Functions
These are functions you will need to use the library

The NPC Wrapper
All properties supported by LunaLua's NPC class are automatically supported.

The mem and kill methods are also supported.

There are four additional properties defined: