Eyes/mouth sockets for all the gems

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Eyes/mouth sockets for all the gems

Post by crisman »

If you are interested, these codes allow the daemon head's sockets (both eyes and mouth) to accepts all the gems, into a single entity. I was a bit tired to have mouth_socket_red and mouth_socket_blue and so on...
Image
Copy in objcet.lua
SpoilerShow

Code: Select all

cloneObject{
            name = "eye_socket_left",
            baseObject = "eye_socket_left",
            onInsertItem = function (self, item)
                         local a, b = string.find (item.name, "_gem")
                         return a ~= nil and b == string.len(item.name) 
                         end,
}   

cloneObject{
            name = "eye_socket_right",
            baseObject = "eye_socket_right",
            onInsertItem = function (self, item)
                         local a, b = string.find (item.name, "_gem")
                         return a ~= nil and b == string.len(item.name) 
                         end,
}   

cloneObject{
            name = "mouth_socket",
            baseObject = "mouth_socket",
            onInsertItem = function (self, item)
                         local a, b = string.find (item.name, "_gem")
                         return a ~= nil and b == string.len(item.name) 
                         end,
} 
a warning, do not use if you have items that end with "_gem" ;)
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Eyes/mouth sockets for all the gems

Post by Neikun »

Big supporter of having all of these available for modders. (big time saver)
Would you mind sticking this in the alcove thread?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Eyes/mouth sockets for all the gems

Post by crisman »

Sure, but sorry for my ignorance... how do I stick?? just copy and paste or something different???
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Eyes/mouth sockets for all the gems

Post by Neikun »

You seem to have figured it out, but yeah.
I would edit my post. ctrl+A, Ctrl+C and then paste in my new destination.
EDIT: WAIT A SECOND! WHERE'D THAT YELLOW GEM COME FROM!?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Eyes/mouth sockets for all the gems

Post by crisman »

Neikun wrote:You seem to have figured it out, but yeah.
I would edit my post. ctrl+A, Ctrl+C and then paste in my new destination.
EDIT: WAIT A SECOND! WHERE'D THAT YELLOW GEM COME FROM!?
I did it, it's nothing special since it does not glows.
Post Reply