Page 3 of 3

Re: I'm stumped... help!

Posted: Fri Sep 14, 2012 1:05 pm
by resonansER
Now it's work! Thank you!

Re: I'm stumped... help!

Posted: Fri Sep 14, 2012 1:41 pm
by Shadowfied
Montis wrote:What he means is that you can swap out the yellow part below to any key object that exists, afterwards it should work with that kind of key.

dungeon_door_wooden_locked_1:setOpenedBy("iron_key")
Yeah, I thought you had to put the name of the specific key you wanted to use. So I put "brass_key_1". That would be a lot better IMO, so you can decide which specific key fits where, oh well.

Re: I'm stumped... help!

Posted: Fri Sep 14, 2012 1:43 pm
by Shroom
Shadowfied wrote:
Montis wrote:What he means is that you can swap out the yellow part below to any key object that exists, afterwards it should work with that kind of key.

dungeon_door_wooden_locked_1:setOpenedBy("iron_key")
Yeah, I thought you had to put the name of the specific key you wanted to use. So I put "brass_key_1". That would be a lot better IMO, so you can decide which specific key fits where, oh well.
I guess you have to limit what keys are available as its the object type rather than an instance of the object that is checked for

Re: I'm stumped... help!

Posted: Fri Sep 14, 2012 1:57 pm
by Montis
If you want to use very specific keys for each lock (that might or might not look the same), you can add additional key types with the cloneObject in the items.lua. I can't confirm that it will work, but I'm quite sure it should.

Re: I'm stumped... help!

Posted: Fri Sep 14, 2012 2:19 pm
by Aazlan
Ok, now that I have the various colored gem socket "keys" figured out, is there any way for me to prevent the party from taking the gem back out once it's inserted?

Re: I'm stumped... help!

Posted: Sun Sep 16, 2012 1:51 pm
by velojun
petri wrote:This is a little bit involved. The basic idea is to place eye_socket_left and eye_socket_right into the same cell as the daemon head. By default eye_socket objects only accept blue_gems so you have to override their onInsertItem functions.
How do you do that?