Scripting Help: Item Placement on Two Alcoves

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
SpiderFighter
Posts: 789
Joined: Thu Apr 12, 2012 4:15 pm

Re: Scripting Help: Item Placement on Two Alcoves

Post by SpiderFighter »

Komag wrote:spam cleaned up
Komag, don't you ever sleep? ;)
User avatar
SpiderFighter
Posts: 789
Joined: Thu Apr 12, 2012 4:15 pm

Re: Scripting Help: Item Placement on Two Alcoves

Post by SpiderFighter »

Decayer wrote:

Code: Select all

function checkItems(caller)
	for i in caller:containedItems() do
		if i.name == "skull" then
			counter_1:decrement()
			return
		end
	end
	
	counter_1:increment()
end
Add a counter and change its ID to counter_1 (or change counter_1 in the code to its ID). Set it to have an initial value of 2 and to toggle your door when it receives "any" event. Link your alcoves to the script entity with an "any" event and make sure that 'Activate Always' is unchecked.
Ohhhhhhhhh.....now I see. I was looking for a statement "if i.name [is not equal to] "item name here"
As usual, I'm overthinking. Thanks for such an elegant lesson, Decayer.
Post Reply