spawn a key at the party's position

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: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: spawn a key at the party's position

Post by Isaac »

Each monster optionally has an 'onDie' hook to be defined or connected to. If it exists the function will be run just before the monster dies.
You could use a function that checks for the other two monsters, and ~not finding them, adds the key to the dying monster's inventory just before death.

BTW: EoB had a "Schrödinger's Gun" in form of the keys you find. On level two for instance, you had one key, and three locks. Whatever door you open, there is a key for the other one somewhere inside... but not if the party keeps the key, and has their thief pick the lock.
Post Reply