Check alcove for specific! item

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Resu
Posts: 141
Joined: Tue Nov 10, 2015 12:09 am

Check alcove for specific! item

Post by Resu »

It wont recognize the specific note. It only works for "note". Any ideas how to solve the problem?


function thanks()
-- iterate through all contained items on alcove, checking for a matching name
for i in northern_dungeon_alcove_20:containedItems() do
if i.name == "note_17" then
i:destroy()
pressure_plate_hidden_152:destroy()
break
end
end
end
User avatar
THOM
Posts: 1266
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Check alcove for specific! item

Post by THOM »

You do not want to seach for the name of an item, but for its id.

So it must be

if i.id == "note_17" then
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
Resu
Posts: 141
Joined: Tue Nov 10, 2015 12:09 am

Re: Check alcove for specific! item

Post by Resu »

Thanks THOM, you are the best ! :D
Post Reply