Page 2 of 2
Re: stationary monsters
Posted: Sun Sep 16, 2012 12:28 am
by ShadowTigerZC
But now my new problem is that I don't know how to remove an item from an alcove
Unless I'm completely misunderstanding the question, I'm seeing a "Remove" button directly to the right of the item in the alcove in the editor, outside of any scripting environment. ... ... ... yeah I'm probably misunderstanding the question.
Unless you didn't add it to the alcove itself, and just added it
on top of the alcove, separate from it, yet occupying the same physical position. .... in which case, it's possible to click on the alcove and add items there in the properties panel actually. To remove items occupying the same space, clear your selection by clicking in a blank area of the map, then click on it again, and it'll provide a pop-out to select which item you'll be interacting with, since both are clumped together.
Re: stationary monsters
Posted: Sun Sep 16, 2012 12:33 am
by Akatana
I mean in game
So if you hit a button the item disappears
Re: stationary monsters
Posted: Sun Sep 16, 2012 12:36 am
by ShadowTigerZC
Well by george, I don't see one here.
Code: Select all
Alcove
Alcove:addItem(item)
Adds an item to the alcove. For example Alcove:addItem(spawn(“dagger”)).
Alcove:containedItems()
Returns an iterator for items contained in the alcove.
Alcove:getItemCount()
Returns the number of items in the alcove.
Alcove:setActivateAlways(enable)
Enables the activate always mode for the alcove. Normally when an item is placed on an alcove, the alcove is triggered only if it was empty. Likewise the alcove is triggered when the last item is removed from it. With activate always the alcove is triggered every time an item is placed or removed from the alcove.
I guess that's something to add eventually. I was thinking of toying around with one of those "Adjust subtle X/Y position of the item in the alcove" but I can't for the life of me find where I saw that, only a few minutes ago even.
Re: stationary monsters
Posted: Sun Sep 16, 2012 12:42 am
by Shroom
ShadowTigerZC wrote:
I guess that's something to add eventually. I was thinking of toying around with one of those "Adjust subtle X/Y position of the item in the alcove" but I can't for the life of me find where I saw that, only a few minutes ago even.
Its under Item in the Scripting Reference
Item:setSubtileOffset(x, y)
Sets item’s relative position to the center of tile.
but I guess this is only within the square its in? Havent tried playing with it.
For my wish list, we need to be able to remove items - or at the very least, move them
Re: stationary monsters
Posted: Sun Sep 16, 2012 1:09 am
by Komag
maybe you can just move the item or delete it anyway, just use the item ID, don't care whether it's in an alcove or anywhere. Just an idea, not tested
Re: stationary monsters
Posted: Sun Sep 16, 2012 1:31 am
by Akatana
I solved it with a secret door which just spawns in front of the alcove so that the player cant get the items back