Unrelating Relations

I have some reciprocal relations that need to be temporary. Here’s the basic idea:

A portal is a kind of thing.

Linking relates one portal to another (called the otherside). The verb to link to (he links to, he linked to, it is linked to, he is linking to) implies the linking relation.

This works. (It’s a way of making doorways whose destinations vary.) But at times, I need all of the portals to be unlinked. I need to clear all of the linkages in order to establish new ones. And this doesn’t work:
now every portal is linked to nothing;
I tried “now every portal is not linked” too. That didn’t work.

I’ve read the pages in the Docs on relations, and I don’t see anything about how to unrelate a relation, much less to process through a bunch of possible relations using “every.” What’s the correct syntax for this?

1 Like
Now linking is empty.

Writing in Inform 13.14

3 Likes

Oddly enough, that doesn’t work. My definition of the linking relation is exactly as shown in my original post, but ‘now linking is empty’ does not compile. Any idea why?

now the linking relation is empty

The doc mentions now R is empty but in that case R is a variable holding a relation. The real name of the relation is “linking relation”, not just “linking”.

2 Likes

Yet another pesky detail I’ll need to add to the Handbook while I’m revising it for the new release. Thanks!

2 Likes

Just wanted to add that the method from your original post would have worked, too; but if you use the passive form of the relation verb, you have to append “by”, like this: now every portal is linked to by nothing.

So, either of the variants below works:

A portal is a kind of thing.

Linking relates one portal to another (called the otherside).

The verb to link to implies the linking relation.

The Lab is a room.

The chair is a portal in the Lab.
The sofa is a portal in the Lab.
The chair links to the sofa.

The couch is a portal in the Lab.
The table is a portal in the Lab.
The couch is linked to by the table.

After jumping:
	now every portal links to nothing;
    [or:]
	[now every portal is linked to by nothing;]
    [or:]
    [now the linking relation is empty;]

Test me with "relations/jump/relations".
3 Likes