[I7] Objects having a property value referring to another.

I suspect this is answered in the manual, but I’m finding my ability to search the documentation and/or know where to look in it annoyingly lacking. So here we go again.

What I want to know is if I can have every character having a value that varies that can refer to any other object. Say every character has an ObjectIKnowOf property, and that property holds a reference to any other object in the game (and can be changed at any point in the game).

I’ve been trying various approaches without success. So is this possible in Inform 7, possible in Inform 7 but requiring access to the Inform 6 internals, or just not possible at all?

Thanks.

Does something like this work?

A person has a thing called ObjectIKnowOf.

This doesn’t seem to be highlighted very much in the documentation – I searched for “has a thing” and it appears in the comments to example 51 and in section 4.17, which is a review section for the chapter on Kinds.

So it’s not just me, then? Looking at it now, it’s pretty obvious, but I couldn’t get it.

Thanks! That seems to do the trick. Interestingly, for the player and any NPC, doing it that way gives them the yourself object for the property’s value (although that isn’t a hard fix).

We remind the listening audience that I’ve put together an unofficial manual index page at eblong.com/zarf/i7index/ , where you would find this under “properties”.

“Yourself” is the default thing object. (Defaults for every kind are listed in the index tab under Kinds. It’s typically the first instance defined of that kind.)