I tried this:xbdj wrote:Got it:
cloneObject{
name = "snail_drop",
baseObject = "snail",
onDie = function(self)
spawn("rock", self.level, self.x, self.y, self.facing)
end,
}
Add this to your monster.lua file (and edit text as necessary ofcourse)
and then simply spawn a "snail_drop" instead of a snail...or whatever monster it is you need to drop it
cloneObject{
name = "skeleton_Iron_Key",
baseObject = "skeleton_patrol",
onDie = function(self)
spawn("iron_key", self.level, self.x, self.y, self.facing)
end,
}
working fine with single monster like skeleton_warrior etc....
not working for skeleton_patrol :/
made some tests and items are not spawning for single group of monsters :/ Any ideas ?