Right now I want to know if an NPC is in a certain room before I enter. If it was available, I'd use 'If parent_of "NCP"=="certain room" { Print "You don't want to go in there!'. But currently I've got a flag called 'npcisinroom' that I turn on and off instead. Is there another way to tell if a certain object is in a certain room without using parent_of? Perhaps I can use conditions on a barrier - but the NPC is behind a lockable door, so there is already a barrier there, which seems to complicate things.
I've come across something similar with containers (which I know are not properly implemented yet). For example, I have an openable cupboard with something inside that I want to see if I open it. Without a ready made container facility, I flag the object with a boolean 'isincupboard'. Then when I open the cupboard I create the object (so I can see it), then either close the cupboard without taking the object (isincupboard stays true, object is destroyed when cupboard closes) or take the object before closing the cupboard (isincupboard set to false, taken object is not destroyed).
As always with these things, there may be a simpler way that I just haven't seen (I'm not an experienced coder) but that's my current workaround.