[I7] asking someone about "[player"]

I’d like to ask a NPC about myself. I thought this would make sense, but it’s not accepted by Inform 7:

Instead of asking Snow-white about "[player]", say "blabla".

It would work if I change the player to be someone else, for example:

[code]Bob is a man. Bob is in Kitchen.
Living-room is north from Kitchen.
Snow-White is a woman in living-room.

When play begins:
now the player is bob.

Instead of asking Snow-white about “[bob]”, say “blabla.”.[/code]

Why is [player] not allowed in the first example? Maybe there is another noun for the player, but I couldn’t find it in the manuel. It least, even if there is one, it would be logical to use the name “player” in this case.

The second example could be used, but the problem is it’s putting a “former self” in the room. And I don’t know either how to remove it. (I can’t say “move the former self to another-room”).

EDIT: I’ve just found the solution: I also tried with “self”, but without luck, we must use “yourself” to manipulate the player this way.
Maybe it would make sense to create a bug report for this, because it’s quite confusing?

It’s possible to say “move yourself to living-room” or “move the player to living-room”, but not to use [player] in a rule.

The Player and Yourself are two quite different entities to Inform. “Yourself” is the name of a person created by the Standard Rules. “Player” is the name of a variable that keeps track of which person in the game is the current player character. By default the variable Player is set to the person Yourself. But, as you know, that default can be easily overridden.

This means that the following source text

[code]The Kitchen is a room.
Bob is a man. Bob is in Kitchen.

When play begins:
now the player is bob.
[/code]
actually creates two persons in the Kitchen.

The Standard Rules create a person called “yourself” and places him in the room where the game begins (i.e. the Kitchen), and your source text creates another person called “Bob” and explicitly places him, too, in the Kitchen.
The Yourself person by default begins existence as the player character, i.e. as the value of the variable Player. But then your source text tells Inform to reset the Player to Bob when play begins; so when play begins Inform changes the Player (i.e. the player character) to Bob, leaving Yourself a non-player character (who, of course, remains in the Kitchen).

So you end up with a Ktichen with two persons: Yourself and Bob. Only it’s Bob who is the Player; Yourself is now just anotther NPC in the game.

However, it would be confusing if Inform kept calling an NPC “yourself”. Therefore, when the person Yourself acts as an NPC, Inform refers to him in output as ”your former self”; and that’s why you’re told you can see your former self in the Kitchen.

If you don’t want the person Yourself in the Kitchen at all, simply write:

The Kitchen is a room. The player is a man called Bob. Bob is in the Kitchen.
and leave out the when play begins rule.

The Standard Rules will still create a person called “yourself”, but he will be placed off-stage, not in any room, since the default value of Player is now overridden even before play begins (as it were).

thank you for the precision.

But it doesn’t explain why it’s not possible to use: asking someone about “[player”]
So is it a bug or not? In this case it would be easier to remember “player” than “yourself”. (and the Inform guide is definitely missing an index, I searched in the guide for this “yourself” name, until I found the solution by using the “actions” command).

In the absence of an official index, zarf’s unofficial index can be nice… though I’m not entirely sure that the documentation for “yourself” would’ve answered your questions. And of course, if you didn’t know that “yourself” was what you were looking for, that wouldn’t have helped at all.

I can add to the index if you point at appropriate chapters.

Oh, I can’t think of any offhand – I just meant that AFAICT (and I could be wrong) there isn’t that much about the “yourself” object in the documentation itself.

this chapter, into which I read about changing the player’s perspective, should definitely talk about the “yourself” thing: inform7.com/learn/man/doc130.html

The reason that Inform won’t accept “[player]” is that it is a global variable, and Inform won’t accept global variables on the left side of Understand declarations.

–Erik