Page 1 of 1

The sinister mimic encounter.

Posted: Thu Nov 06, 2014 2:19 am
by GoldenShadowGS

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
 
What this does: You have a choice of two chests in a room. When you walk into the room, you pass over an invisible floor trigger that activates the addchestconnect() function.
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.

Re: The sinister mimic encounter.

Posted: Thu Nov 06, 2014 2:35 am
by TSotP
...stolen...

thanks dude

Re: The sinister mimic encounter.

Posted: Thu Nov 06, 2014 7:49 am
by Ixnatifual
You can also use this: viewtopic.php?f=22&t=7905#p80459