Hiding and showing objects

Alex
17 Jul 2011, 10:26
Pertex logged a (perfectly reasonable) request on the Issue Tracker for HideObject and ShowObject functions in Quest 5. I thought it would make sense to copy the reply I wrote here, just to make more people aware and in case anybody disagrees:

I've decided not to implement the Quest 4-style "hide" and "show", as I think the new design of Quest 5 means these are no longer needed. You can now reliably use containers to keep certain objects out of scope or unreachable, and if you want to make an object appear from somewhere else, then you should move it.

So instead of "hide", you can set an object's parent to null.
Instead of "show", you can set an object's parent to the room it should appear in.

I think this keeps things simpler - we don't need to clutter up all the scope functions by making them check whether an object is "really" there or not.

SamIam
27 Oct 2011, 03:48
The containers work great for showing and hide an object. How do you keep any object from showing if a person drops an object in a room that is too dark to see anything?

Alex
27 Oct 2011, 08:47
Depends how you're implementing light and dark - at some point this will be built-in, but until then you can have separate "light" and "dark" rooms. In the "After dropping the object" script, if the player is in the "dark" room, move the object to the "light" room.

Then when the lights come on, move the player to the "light" room.