
Name of Treasure Chest Monster [Solved]
Name of Treasure Chest Monster [Solved]
Hello, does anyone know the name of treasure chest monster? 

Last edited by Jouki on Tue Oct 28, 2014 9:40 pm, edited 1 time in total.
Re: Name of Treasure Chest Monster
thanks, how can I do that as in original game - looking like true chest and when looting the treasure chest changes to Mimic?
Re: Name of Treasure Chest Monster
Much the same way here when he's spawning in the Ogre, just remove the chest and put the mimic in it's x,y.
Re: Name of Treasure Chest Monster
ok actually I've found better solutionNutJob wrote:Much the same way here when he's spawning in the Ogre, just remove the chest and put the mimic in it's x,y.
Code: Select all
chest_3.chest:setMimic(true)
Re: Name of Treasure Chest Monster
time to try this out!Jouki wrote:ok actually I've found better solutionNutJob wrote:Much the same way here when he's spawning in the Ogre, just remove the chest and put the mimic in it's x,y.Code: Select all
chest_3.chest:setMimic(true)
Edit* Works a treat, thanks man!
Re: Name of Treasure Chest Monster
glad to helpDrKojak wrote:time to try this out!Jouki wrote:ok actually I've found better solutionNutJob wrote:Much the same way here when he's spawning in the Ogre, just remove the chest and put the mimic in it's x,y.Code: Select all
chest_3.chest:setMimic(true)
Edit* Works a treat, thanks man!

Re: Name of Treasure Chest Monster [Solved]
You can make things a little more interesting using this function:
Note that I use a timer with a 0.1 interval to trigger the function once before disabling itself. If I have this code run immediately instead of with a delay (in this case provided by the timer) it appears math.random generates the same sequence of numbers every time, which means it's always the same chests that are mimics. With the timer in place the mimic placement varies, which is my intention.
Code: Select all
function mimics()
local i = 1
local entity = findEntity("chest".."_"..i)
while entity ~= nil do
if math.random(1,10) == 1 then
entity.chest:setMimic(true)
end
i = i + 1
entity = findEntity("chest".."_"..i)
end
end
Re: Name of Treasure Chest Monster [Solved]
Worth noting, any items placed in said chest using the, setMimic(true) will cause the mimic monster spawned by it, to drop those same items when it is killed.
My slow going projects...
viewtopic.php?f=14&t=4538&p=59753#p59753
viewtopic.php?f=14&t=4538&p=59753#p59753