Page 1 of 1
Mimics
Posted: Thu Nov 06, 2014 2:23 am
by Karinas23
is there a way to trigger a chest to transform into a mimic without opening the chest ? like i want the player to walk into a room and step on a floor trigger that causes 4 chests in the room to transform rather than when you open them.
Re: Mimics
Posted: Thu Nov 06, 2014 3:41 am
by Batty
There's probably a better way but have the party trigger this script:
Code: Select all
function open()
chest_1:destroy()
spawn("mimic", 1, 15, 16, 0, 0, nil)
chest_2:destroy()
spawn("mimic", 1, 18, 16, 0, 0, nil)
--etc..
end
and it will work. You have to set the spawn locations to match your chest locations and repeat it with chest_2, chest_3, etc.
Re: Mimics
Posted: Thu Nov 06, 2014 5:10 am
by Karinas23
will that instantly just swap the models or actually show it changing shape ?
Re: Mimics
Posted: Thu Nov 06, 2014 8:41 am
by Prozail
you could try something like
Code: Select all
function mimicMe()
if chest_1 then
local mimic = chest_1:spawn("mimic")
chest_1:destroy()
mimic.animation:play("open")
playSound("mimic_open")
end
end
that will start by playing the "open" animation and sound. He might clip, if his brain descides to move earlier than the animation ends, but don't know what to do about that.
Edit: Added error-checking and fixed typo also, keep in mind, it there are items in the chest, that has to be handled, otherwise they will simply be on the ground when the chest is destroyed.
If anyone knows how to trigger the click-event on something by a script please tell! It would simplify things.