Page 1 of 1

howto query: Visible but inaccessible alcove

Posted: Sat May 23, 2015 10:17 am
by kaypy
Hi

Ive been playing around with making a covered alcove where there is a barrier that prevents the player grabbing the contents of the alcove. The only way I found to prevent the player grabbing stuff "through" the barrier was by making a fake alcove+item graphic and substituting that until the barrier was lowered.

Is there a way I can make an arbitrary* item visible but not getable?

Here is a minimal example of my hacky version
http://en.file-upload.net/download-1063 ... a.zip.html

--

* ie I'd like to have it show whatever is in the alcove without needing any specific code matching the content of the alcove

Re: howto query: Visible but inaccessible alcove

Posted: Sat May 23, 2015 7:01 pm
by Saumun
I did a similar thing where i copied and renamed the firestaff bitmaps, then cloned the firestaff but made it a deco wallitem... I then shifted the x and y to make it appear in the right position, and used a qswapper in ESB to swap it for the real firestaff when an objective was completed.
Worked fine. Pretty simple and needed no coding.

However, i don't think this is what you want... right?
Are you looking for a command that can simply stop you picking up the object?

Re: howto query: Visible but inaccessible alcove

Posted: Sun May 24, 2015 12:05 am
by Sophia
If you have a wallitem with draw_contents set to true, DSB will draw whatever is inside the wallitem on top of it, which will look like items in an alcove. This is in effect generating your "fake" graphic but DSB is doing it automatically. You can then set up an on_click function that will only make the alcove operate when you want it to.

Take a look at test_dungeon/doublealcoves.lua for an example of making an alcove this way.

Re: howto query: Visible but inaccessible alcove

Posted: Sun May 24, 2015 6:22 am
by kaypy
Saruman: That sounds an awful lot like my hacky version

Sophia: Thanks. I had actually thought "is there anything in the test_dungeon that does something like this" but had dismissed looking at the small alcove because it hides everything when disabled...

Anyhow, here is the fixed version of the test example, in case it is useful for anyone
http://en.file-upload.net/download-1063 ... a.zip.html

Re: howto query: Visible but inaccessible alcove

Posted: Sun May 24, 2015 3:30 pm
by Saumun
Sorry Kaypy... I confess i hadn't actually looked in all of your lua files, as i was on my way to work. It is indeed almost the same.

Re: howto query: Visible but inaccessible alcove

Posted: Sun May 24, 2015 4:00 pm
by kaypy
No apology required- I was just highly amused that our solutions matched right down to the faked object being the firestaff 8-)

(I guess it is the most obvious candidate, but even so...)