Recreate level 4 puzzle problems
Posted: Fri Oct 19, 2012 9:59 pm
I want to "recreate" the puzzle on level 4, where you have to put a specific scroll in a specific alcove.
I also want these scrolls to be found on an alcove or altar.
So..
1. The script from the website only makes it work for any scroll or any dagger as long as it is in the same "item group". I want it to only work with a very specific item (in this case a specific scroll)
Im guessing it will have something to do with the items id?
What should i add/change in the code to make this work?
2. I want these scrolls not to just lay around on the ground, these scrolls are gonna be put in an alcove or on an altar. But how do i give an item an uniqe id that i created via script?
What should i change/add here to make the item have a specific id?
I also want these scrolls to be found on an alcove or altar.
So..
1. The script from the website only makes it work for any scroll or any dagger as long as it is in the same "item group". I want it to only work with a very specific item (in this case a specific scroll)
Im guessing it will have something to do with the items id?
Code: Select all
function itemPuzzle()
-- iterate through all contained items on alcove, checking for a matching name
for i in itemPuzzleAlcove:containedItems() do
if i.name == "scroll" then
playSound("level_up")
break
end
end
end2. I want these scrolls not to just lay around on the ground, these scrolls are gonna be put in an alcove or on an altar. But how do i give an item an uniqe id that i created via script?
Code: Select all
local message = spawn("scroll")
message:setScrollText("This is an important\nmessage!")
scrollAlcove:addItem(message)