Listing the room an NPC is in

DravenLord_1982
05 Dec 2024, 17:10

I'm creating a monitoring system that will feed back what room my NPCs are in at any time.

For some reason, I can't get a Message field to bring back the room. Have searched the forums and nobody seems to want exactly the same thing.

I tried various permutations of the below but only gave the objectname but not the parent room.

{object:objectname} is in the {objectname.parent}


mrangel
05 Dec 2024, 17:22

{object:objectname} is in the {objectname.parent}

That looks like it should work; but the parent attribute is the actual room object, not the name of the room.

You probably want something like:
{object:objectname} is in the {=GetDisplayAlias(objectname.parent)}

(I was going to suggest using GetDefiniteName instead; but realised that it won't actually do what I would have expected, because that function works in a somewhat counterintuitive way)


DravenLord_1982
05 Dec 2024, 17:38

Legend, that works perfectly. Thank you!