Page 14 of 36

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Mon Oct 08, 2012 10:32 pm
by Neikun
I've been trying to figure out how to get an item down that grate/allow it to be retrieved.
How exactly did you get it down there? Alcove on the wall with position away from the wall and far far down?

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Mon Oct 08, 2012 10:39 pm
by Batty
oooh that's a good one!

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Mon Oct 08, 2012 10:56 pm
by crisman
Okay, seems there is a problem with jonh's gmt. We'll see if it's a bug or something else!
Anyway, the script is already done, so once the program is fixed I'll need only 5 minutes.

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Mon Oct 08, 2012 11:04 pm
by crisman
Neikun wrote:I've been trying to figure out how to get an item down that grate/allow it to be retrieved.
How exactly did you get it down there? Alcove on the wall with position away from the wall and far far down?
Yes, exaclty.
Here's the script
SpoilerShow
cloneObject{
name = "drainage_alcove",
baseObject = "ornate_lock",
anchorPos = vec(0, -2.5, -1.2),
anchorRotation = vec(0, 0, 0),
targetPos = vec(0, 1.3, 0),
targetSize = vec(0.3, 0.3, 0.3),
onInsertItem = function (self, item)
return item.name == "ornate_key" and self:getItemCount() == 0
end,
}
Right now it's just a joke, since I've placed a lock in front of the alcove with nothing linked, so if you use the key on the lock, the key will fall down the drainage. Of course, you need to place a drainage as a deco. I'll figure out a way on how I can retrive the key :D

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Mon Oct 08, 2012 11:36 pm
by crisman
Okay, I've done something interesting. Using the spear you'll be able to take the key out from the drainage.
SpoilerShow
Image
Usinge the spear on that spot...
SpoilerShow
Image
...will retrieve the key!
SpoilerShow
Image

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Mon Oct 08, 2012 11:39 pm
by Neikun
Nicely done!

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Mon Oct 08, 2012 11:44 pm
by crisman
I'll change the script a little bit, and then I will share it
@neikun thank you :D

EDIT: Here's, now it works with everything - I hope you don't use it to pick up a shield from a drainage... what the hell... - , and with multiple items. Using the spear will only pick one item at the time. You cannot place anything in the drainage by purpose, but only in the editor.
Another interesting thing done with alcoves. Cheers.
SpoilerShow
cloneObject{
name = "drainage_alcove",
baseObject = "eye_socket_left",
anchorPos = vec(0, -2.5, -1.2),
anchorRotation = vec(0, 0, 0),
targetPos = vec(0, 0.25, 0),
targetSize = vec(0.3, 0.3, 0.3),
onInsertItem = function (self, item)
if item.name == "legionary_spear" then


for i in self:containedItems() do

spawn(i.name, party.level, party.x, party.y, party.facing)

i:destroy()

return

end

if self:getItemCount() == 0 then

self:destroy()

end

end
return false
end,
}

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Tue Oct 09, 2012 12:38 am
by Trap
haha that's awesome

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Tue Oct 09, 2012 3:52 am
by crisman
Done with the hook. Cheers to John that helped me with gmt, now the hook is on the wall!
Image

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Posted: Tue Oct 09, 2012 3:55 am
by Neikun
Hey! Get that code in here pronto!