Eye socket function list?
Eye socket function list?
I couldn't find a function list for eye sockets. I can connect them to a script entity, but have no idea how to script for them. Anyone have a list?
Re: Eye socket function list?
Eye socket is an Alcove.
Re: Eye socket function list?
I have one more problem. I know nothing about lua, except what I have learned from here. My following script doesn't seem to work correctly. If I put a gem in either eye, the door opens. My intention is that it takes a gem in both eyes. I am obviously doing something wrong.
-- Eye Socket Lock
function eyes()
if eye_socket_left_1:containedItems(blue_gem) and
eye_socket_right_1:containedItems(blue_gem)
then
dungeon_secret_door_3:open()
else
dungeon_secret_door_3:close()
end
end
-- Eye Socket Lock
function eyes()
if eye_socket_left_1:containedItems(blue_gem) and
eye_socket_right_1:containedItems(blue_gem)
then
dungeon_secret_door_3:open()
else
dungeon_secret_door_3:close()
end
end
- Montis
- Posts: 340
- Joined: Sun Apr 15, 2012 1:25 am
- Location: Grimrock II 2nd playthrough (hard/oldschool)
Re: Eye socket function list?
the script seems good, maybe you messed up the connectors a bit?
you only need to connect both eyes to the script, with no connectors to the door.
you only need to connect both eyes to the script, with no connectors to the door.
Re: Eye socket function list?
That's how I have it connected. Both sockets to the script. None to door.
-
- Posts: 163
- Joined: Fri Sep 14, 2012 6:20 pm
Re: Eye socket function list?
For each socket:-
activate decrements a counter
deactivate increments the counter
Add counter set to 2, connected by each socket
Connect counter to door
When 2 gems are socketed the door will open.
NO scripts needed for this, as long as your sockets are coded right
eg:-
activate decrements a counter
deactivate increments the counter
Add counter set to 2, connected by each socket
Connect counter to door
When 2 gems are socketed the door will open.
NO scripts needed for this, as long as your sockets are coded right
eg:-
Code: Select all
cloneObject{
name = "red_eye_left",
baseObject = "eye_socket_left",
onInsertItem = function(self, item)
return item.name == "red_gem" and self:getItemCount() == 0
end
}
Re: Eye socket function list?
Only problem with the counter, is I want to have it where I can take a gem out and it close, and then put it back in to open again. It will open once, and I can add connectors to close them, but then it won't reopen.
-
- Posts: 163
- Joined: Fri Sep 14, 2012 6:20 pm
Re: Eye socket function list?
On each socket add a 'deactivate' hook to the door, set to close
Re: Eye socket function list?
I forgot to set the deactivate to increment the counter as well as close the door. That fixed it. Thanks so much for you help.