Does onDie work in LOG 2?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Does onDie work in LOG 2?

Post by Isaac »

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.
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: Does onDie work in LOG 2?

Post by cameronC »

Isaac wrote:

Code: Select all

spawn("bone_club",1,1,1,1,1,"bone_club_1")
my_mummy_A.monster:addItem(bone_club_1.item)
*There is likely another ~better way, but I'm still looking...

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
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Does onDie work in LOG 2?

Post by Isaac »

cameronC wrote:
Isaac wrote:

Code: Select all

spawn("bone_club",1,1,1,1,1,"bone_club_1")
my_mummy_A.monster:addItem(bone_club_1.item)
*There is likely another ~better way, but I'm still looking...

my_mummy_A.monster:addItem(spawn("bone_club").item) spawns it automatically 'inside' the monster, too.
Ah... ninja'ed by about a minute... Image

It's only slightly different from the way it was in LoG1.
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

Re: Does onDie work in LOG 2?

Post by Prozail »

just posting to show a different way of changing the loot.. You can change the actual loottable of the monster like this.

Code: Select all

		local mob = spawn("crowern",1,13,22,2,0)
		mob.monster:setLootDrop({100,"baked_maggot",25,"baked_maggot"})

this will make a 100% drop of baked maggot, and an additional 25% chance of a second maggot.
Post Reply