Really quick question. I’ve been banging my head on a table about this one. Is there any way of keeping track of the ‘absolute’ location of an object.
currentLoc is a room that varies. now currentLoc is the location of the Widget. ... now Gadget is in currentLoc.
That’s fine if I just want to record the room it’s in. But, and this is the bit I can’t work out if there’s a simple way of doing it, what if it’s in something in the room:
The Cabinet is in the kitchen. Widget is a thing in the Cabinet. currentLoc is a ?location? that varies. now currentLoc is the ?location? of the Widget. ... now the ?location? of the Gadget is currentLoc
which would hopefully move Gadget into the cabinet.
So, in other words, is there a simple way of recording exactly where a thing is (in a location, in something, on something, part of something) and then using that as a variable? i.e. Whether the Widget is in the Kitchen, or in the Cabinet in the Kitchen, I can record that.
Thanks in advance,