Page 1 of 1

Check alcove for specific! item

Posted: Sat Mar 05, 2022 5:46 pm
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

Re: Check alcove for specific! item

Posted: Sat Mar 05, 2022 8:35 pm
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

Re: Check alcove for specific! item

Posted: Sat Mar 05, 2022 11:14 pm
by Resu
Thanks THOM, you are the best ! :D