I’m trying to use the status line to keep track of what player you’re currently playing as.
I tried setting the status line to “[the player]”, but it just types, ‘Yourself’. Is there any way to go around this to the normal printed name of the character you are?
The “standard name printing rule” is a “rule for printing the name of”, written in I6. By default it has a special case for the player. But you could change that!
This will change all references to the player’s name.
If you only want to change it in one specific instance, you can use “[the printed name of the player]”, but that will circumvent any special “rules for printing the name”.
Finally, the best option that doesn’t involve I6 hacking even though it’s rather klugey:
[code]To zero the player: (- player = 0; -).
To reset the player: (- player = noun; -).
To say the/-- player’s name:
let the previous noun be the noun;
now the noun is the player;
zero the player; [“Now the player is nothing” will make Inform unhappy]
say “[the noun]”;
reset the player;
now the noun is the previous noun.[/code]
A global variable is the easiest way to make it accessible in I6, and the noun is a convenient variable to use.
Rule for printing the name of Teresa while constructing the status line: say "Teresa".
Rule for printing the name of Maleska while constructing the status line: say "Maleska".
one for each playable character. This is (a slight modification of) the recommendation from the documentation, in Example 121: Terror of the Sierra Madre.