Inform 7: having time not pass when changing the player

I’m trying to create a time-sensitive game where the PC changes sometimes. Some actions, like switching who you’re playing should take no time, so I’m using a ‘Timeless’-like scenario where certain actions take no time.

The problem seems to be that the action used to trigger changing who the player is, is taken by the former player, and when the actions are checked, it’s the action that the current player took (which seems to be ‘waiting’) that is checked. The problem is that ‘waiting’ should advance time, usually; just not if the player just switched into that person. Anyone have any ideas how to handle this?

Here’s a working example:

"Lucian's Testing Room" by Lucian Smith

Errors1 is a room.

Alice is a woman in errors1.  The description is "Alice."
Bob is a man in errors1.  The description is "Bob."

The player is Alice.

A button is a device in errors1.

button2 is a device in errors1.

Instead of pushing the button:
	if the player is Alice:
		now the player is Bob;
		say "You're Bob now.";
	otherwise if the player is Bob:
		now the player is Alice;
		say "You're Alice now.";
	rule succeeds;

Examining something is acting fast. 
Looking is acting fast.
Pushing is acting fast.

The take quick actions out of world rule is listed before the every turn stage rule in the turn sequence rules.

This is the take quick actions out of world rule:
	if acting fast, decide yes;

When play begins: 
	now the right hand status line is "[time of day]";
	
test me with "push button/push button2/switch button/x me"
2 Likes

If what I understand is correct, you may want to look here: Checking the result of a previous action.

But I can’t quite get what you mean, so maybe not?

3 Likes

That was a great suggestion! It was enough to get me to this working solution:

"Lucian's Testing Room" by Lucian Smith


Errors1 is a room.

Alice is a woman in errors1.  The description is "Alice."
Bob is a man in errors1.  The description is "Bob."

The player is Alice.

A person can be transforming.  A person is usually not transforming.

A button is a device in errors1.

button2 is a device in errors1.

Instead of pushing the button:
	if the player is Alice:
		now the player is Bob;
		now Bob is transforming;
		say "You're Bob now.";
	otherwise if the player is Bob:
		now the player is Alice;
		now Alice is transforming;
		say "You're Alice now.";
	rule succeeds;

Examining something is acting fast. 
Looking is acting fast.
Pushing is acting fast.

The take quick actions out of world rule is listed before the every turn stage rule in the turn sequence rules.

This is the take quick actions out of world rule:
	if the player is transforming:
		now the player is not transforming;
		rule succeeds;
	if acting fast, rule succeeds;

When play begins: 
	now the right hand status line is "[time of day]";
	
test me with "push button/push button2/switch button"

Thanks again!

3 Likes