The sinister mimic encounter.

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
GoldenShadowGS
Posts: 168
Joined: Thu Oct 30, 2014 1:56 am

The sinister mimic encounter.

Post 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.
Last edited by GoldenShadowGS on Thu Nov 06, 2014 2:43 am, edited 1 time in total.
User avatar
TSotP
Posts: 74
Joined: Tue Oct 15, 2013 8:42 am

Re: The sinister mimic encounter.

Post by TSotP »

...stolen...

thanks dude
Ixnatifual

Re: The sinister mimic encounter.

Post by Ixnatifual »

You can also use this: viewtopic.php?f=22&t=7905#p80459
Post Reply