Chest to mimic upon opening?

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!
Post Reply
barronvonburp
Posts: 30
Joined: Mon Jul 13, 2015 7:41 am

Chest to mimic upon opening?

Post by barronvonburp »

How would one go about making this script a reality?
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Chest to mimic upon opening?

Post by THOM »

run a script with

Code: Select all

chest_1.chest:setMimic(true)
"chest_1" must be the name of your chest.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
barronvonburp
Posts: 30
Joined: Mon Jul 13, 2015 7:41 am

Re: Chest to mimic upon opening?

Post by barronvonburp »

Right, how would i edit said mimic's HP using a script?
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Chest to mimic upon opening?

Post by Azel »

I spawn modified mimic's but I cheat a bit. I use a floor trigger instead of relying on the Player to click the Chest.

See this thread for the full sample Dungeon code: http://grimrock.net/forum/viewtopic.php ... 304#p97304
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Chest to mimic upon opening?

Post by AndakRainor »

Just for convenience:

Code: Select all

defineObject{
  name = "mimic_chest",
  baseObject = "chest",
  components = {
    {
      class = "Chest",
      mimic = true,
    },
  },
}
There should have been an option in the editor gui for that!
Post Reply