Hi, need help alcove script.
In alcove is "SnakeKey"
party take key = open pit
party insert key to alcove = close pit
Thanks
Alcove item remove
Alcove item remove
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html
Re: Alcove item remove
Try this script, but first you need to add a coounter. Don't forget to connect the alcove to the script with activate always ticked, and set to "any" the event.
function pitOpen()
counter:setValue(0)
for i in alcove:containedItems() do
if i.name == "SnakeKey" then
pit:close()
counter:setValue(1)
end
end
if counter:getValue() == 0 then
pit:open()
end
end
function pitOpen()
counter:setValue(0)
for i in alcove:containedItems() do
if i.name == "SnakeKey" then
pit:close()
counter:setValue(1)
end
end
if counter:getValue() == 0 then
pit:open()
end
end
Re: Alcove item remove
counter is good idea, thanks
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html
Re: Alcove item remove
If add false key to alcove script is not work. Please help.
SpoilerShow
function SnakeKey()
counter_snake_key:setValue(0)
for i in alcove_snake:containedItems() do
if i.name == "snake_key" and "snake_key_false" then
dungeon_pit_52:close()
dungeon_pit_53:close()
counter_snake_key:setValue(1)
end
end
if counter_snake_key:getValue() == 0 then
dungeon_pit_52:open()
dungeon_pit_53:open()
end
end
counter_snake_key:setValue(0)
for i in alcove_snake:containedItems() do
if i.name == "snake_key" and "snake_key_false" then
dungeon_pit_52:close()
dungeon_pit_53:close()
counter_snake_key:setValue(1)
end
end
if counter_snake_key:getValue() == 0 then
dungeon_pit_52:open()
dungeon_pit_53:open()
end
end
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html
Re: Alcove item remove
I need to know how the pits should behave.
They must close when both keys are inside the alcove?
I think... you want to swap the right key key with the fake one to keep the pits close, right?
If so, should be (haven't tested)
EDIT: just realised you haven't put
i.name ==
right before "snake_key_false"
maybe it's just for that.
They must close when both keys are inside the alcove?
I think... you want to swap the right key key with the fake one to keep the pits close, right?
If so, should be (haven't tested)
SpoilerShow
function SnakeKey()
counter_snake_key:setValue(0)
for i in alcove_snake:containedItems() do
if i.name == "snake_key" or i.name == "snake_key_false" then
dungeon_pit_52:close()
dungeon_pit_53:close()
counter_snake_key:setValue(1)
end
end
if counter_snake_key:getValue() == 0 then
dungeon_pit_52:open()
dungeon_pit_53:open()
end
end
counter_snake_key:setValue(0)
for i in alcove_snake:containedItems() do
if i.name == "snake_key" or i.name == "snake_key_false" then
dungeon_pit_52:close()
dungeon_pit_53:close()
counter_snake_key:setValue(1)
end
end
if counter_snake_key:getValue() == 0 then
dungeon_pit_52:open()
dungeon_pit_53:open()
end
end
i.name ==
right before "snake_key_false"
maybe it's just for that.
Re: Alcove item remove
work correct, thanks
player first take on alcove snake_key_false, after snake_key
must return false key to alcove = pit close (test combinations OK)
player first take on alcove snake_key_false, after snake_key
must return false key to alcove = pit close (test combinations OK)
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html