At this moment the following monsters work:
- Ogres
- Skeleton warriors
- Scavengers
- Goromorg
You can:
- Create/remove an npc
- Make him walk a predefined path
- Make him (in)vulnerable with a single statement
- Define functions that are called when you click the NPC or give him an item
I released the source in a ready-to-play demo. Download it here. To use it in your own dungeon, consult the README.TXT in the "mod_assets/md_npc" folder.
Click here for a movie demonstrating the script.
List of available functions. (See source for parameters and more comment)
Code: Select all
mdNPC.addNPC() - Spawn an NPC
mdNPC.registerNPC() - Register a monster as an NPC
mdNPC.removeNPC() - Despawn the monster and remove it from the NPC list
mdNPC.setRounte() - Defines a route for the NPC to walk
mdNPC.appendRoute() - Appends the defined route to the current route of the NPC
mdNPC.setInvulnerable() - Defines if the NPC is invulnerable to damage
mdNPC.isWalking - Indicates if the NPC is currently walking (walking characters don't respond to click events)
mdNPC.setOnClick() - Set which function to call when the player clicks on the NPC
mdNPC.setOnGive() - Set which function to call if the player gives and item to the NPC
mdNPC.setTag() - Set the value of the tag. Use a tag for your own purpose. In the demo I use it to track progress in the 'plot' and response from the monster
mdNPC.getTag() - Get the value of the tag

