Code: Select all
hasmimic = false
function addchestconnect()
for i = 1,2,1 do
local findchest = findEntity("maybemimic"..i)
findchest.clickable:addConnector("onClick", "script_entity_12", "twochests"..i)
end
end
function twochests1()
if maybemimic2 ~= nil and hasmimic == false then
maybemimic2.chest:setMimic(true)
hasmimic = true
end
end
function twochests2()
if maybemimic1 ~= nil and hasmimic == false then
maybemimic1.chest:setMimic(true)
hasmimic = true
end
end
No matter what you choose, the first chest will be normal and the second one will be a mimic, scaring the shit out of the player.
Change "script_entity_12" to match your actual script name in the editor. Name the chests "maybemimic1" and "maybemimic2" or else change the script to match the names you choose.