Putting words in the player's parser

I have a series of questions that I want the player to answer, so I use the “if player consents” construct. However, I want to test something further down in play, so would like to build a test script that answers these questions automatically.

If have a TestFlag that is set to ON when I want to skip the questioning, but how do I pretend the player has answered?

After looking in SE_Road the first time:
	say "A burly guard blocks the road. 'Girard said you would be coming, but only registered adventurers can enter,' he says.[paragraph break]";
	say " 'Do you want to register as an adventurer-in-training?' ";
	if TestFlag is "ON":
		[what goes here?]
	if the player consents:
		now stage is stName;
		follow the every turn rules;
		follow the advance time rule;
	otherwise:
		say "[line break] 'The guard brings himself to his full six foot height and puts his hand on his formidable sword. 'Then turn around and be on your way,' he commands.";
		end the story.

What code block follows the if TestFlag is "ON":?
I’ve tried now the player consents and
[code “YES”[/code] and neither works.

If I understand you correctly, you need an otherwise block around the consent condition:

if TestFlag is "ON":
    ...
otherwise if the player consents:
    now stage is stName;
    follow the every turn rules;
    follow the advance time rule;
otherwise:
    say "[line break] 'The guard brings himself to his full six foot height and puts his hand on his formidable sword. 'Then turn around and be on your way,' he commands.";
    end the story.
1 Like

Yes, that seems to work. Thanks.

If you just want to skip without having extra code, use:

if the player consents and TestFlag is "OFF":

Good trick. Thanks.