Making monsters drop stuff when they die

Post: #1
Thanks to everyone that helped me make my staircases. I now have one last thing to do in order to soup up my code to the point where I am happy with it...

I need to make my monsters have an inventory, which they will drop when they die, for example they might be holding a key, or some hearts.

This is how I would like to be able to define such an inventory (in the plist for the map, which defines how all the objects are created). (The H string is the string that is the key for the Heart class's definition.)

            <key>Class Name</key>

There is a function called didDieOnMap which seems like it would be the place to add the code for shedding one's inventory.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Newbie question about libraries and unix stuff... WhatMeWorry 8 6,418 Jun 25, 2005 04:17 PM
Last Post: OneSadCookie
  Moving stuff around derangedPEZ 5 5,626 Aug 17, 2002 04:54 AM
Last Post: derangedPEZ