Does onDie work in LOG 2?
Re: Does onDie work in LOG 2?
my_mummy_A.monster:addItem(spawn("bone_club").item)
Last edited by Isaac on Fri Nov 07, 2014 8:30 am, edited 1 time in total.
Re: Does onDie work in LOG 2?
Isaac wrote:*There is likely another ~better way, but I'm still looking...Code: Select all
spawn("bone_club",1,1,1,1,1,"bone_club_1") my_mummy_A.monster:addItem(bone_club_1.item)
my_mummy_A.monster:addItem(spawn("bone_club").item) spawns it automatically 'inside' the monster, too.
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.
Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
Re: Does onDie work in LOG 2?
Ah... ninja'ed by about a minute...cameronC wrote:Isaac wrote:*There is likely another ~better way, but I'm still looking...Code: Select all
spawn("bone_club",1,1,1,1,1,"bone_club_1") my_mummy_A.monster:addItem(bone_club_1.item)
my_mummy_A.monster:addItem(spawn("bone_club").item) spawns it automatically 'inside' the monster, too.

It's only slightly different from the way it was in LoG1.
Re: Does onDie work in LOG 2?
just posting to show a different way of changing the loot.. You can change the actual loottable of the monster like this.
this will make a 100% drop of baked maggot, and an additional 25% chance of a second maggot.
Code: Select all
local mob = spawn("crowern",1,13,22,2,0)
mob.monster:setLootDrop({100,"baked_maggot",25,"baked_maggot"})
Links to my YouTube playlist of "tutorials" and to my forum thread.