Switching player not working when switching back

I don’t understand why this is not working. I have borrowed the “becoming” action from another forum post, and I can switch between different characters but I can’t switch back to my starting character.

Dining room is a room. "You are in the dining room. There is a large dining table, set for a meal."

Mina is a woman in the dining room.
Lucy is a woman in the dining room.
Dracula is a man in the dining room. The player is Dracula.

Becoming is an action applying to one thing. Understand "become [something]" as becoming. 
Carry out becoming: 
	if the noun is not a person: 
		say "You can't become something inanimate."; 
	otherwise if the noun is the player: 
		say "You're already yourself."; 
	otherwise: 
		say "You become [the noun]."; 
		now the player is the noun; 
		try looking.

Here’s my sample output:

Dining room
You are in the dining room. There is a large dining table, set for a meal.

You can see Mina and Lucy here.

>become mina
You become Mina.

Dining room
You are in the dining room. There is a large dining table, set for a meal.

You can see Lucy and Dracula here.

>become lucy
You become Lucy.

Dining room
You are in the dining room. There is a large dining table, set for a meal.

You can see Mina and Dracula here.

>become dracula
You can't see any such thing.

It also fails with “You can’t see any such thing” if I type look Dracula after becoming another person, even though the room description says you can see Dracula there. That actually fails before I switch actors too. If I switch to Mina and write “Look Mina” I get Mina’s description. So it makes me think there is something special about the starting character that removes it from the interactable object space that I need to somehow turn off or undo, but not sure how to do that.

1 Like

Hi and welcome to the forum!

If you add the following it should work:

Understand "Dracula" as Dracula.

See also the example Terror of the Sierra Madre as referred by the docs:

8.9. Moving the player (ganelson.github.io)

In my WIP I use a slightly different approach to avoid the Understand trickery:

When play begins:
	now the player is Dracula; [ associate the player variable with the Dracula character ]
	now yourself is nowhere; [ move the default "yourself" character originally assigned to the player off stage ]
5 Likes

Ah thanks! I like the When play begins trick, works like a charm!

1 Like