Restricting the player in a scene

Hi once again, Alpha23 here with another nooby question! :wink:

Nothing too special this time, just trying to set up some basic scenes in my little project. Here’s what I basically want to do but which obviously doesn’t work: Instead of doing something other than going east or waiting or closing door AB or examining the wall during Epilogue Ia, say "nope." What’s the proper way of accomplishing something like that?

Thanks for your patience with me trying to understand the crude basics. :wink:

Try defining a kind of action, as in §7.15 of the documentation.

[code]Going east is epiloguey action. Waiting is epiloguey action. Closing door AB is epiloguey action. Examining the wall is epiloguey action.

Instead of doing something during Epilogue Ia when the current action is not epiloguey action, say “nope.”[/code]

(I haven’t tested this so I’m not absolutely sure about the syntax in the last line.)

Hm, that doesn’t work… I get the error message

The way to phrase this is:

Instead of doing something when not epiloguey action during Epilogue Ia :
	say "nope."

or

Instead of doing something when Epilogue Ia is happening and not epiloguey action :
	say "nope."

I can’t remember if it’s explicitly stated in the documentation, but I’ve found that Inform really prefers you to put “during [scene]” qualifiers at the very end of a rule declaration whenever possible.

Yeah, now that I’ve actually tested it this works:

Instead of doing something when the current action is not epiloguey action during Epilogue Ia: say "Nope."

zarf’s formulation works too–I think it used to be possible to write

Instead of not [kind of action]

but that doesn’t work anymore as of a version or two ago. Or maybe I forgot the proper phrasing. That’s more elegant, and in fact reads more naturally if you give your kind of action “-ing” names instead of noun names:

[code]East Lab is a room. West Lab is a room. Door AB is a door. Door AB is west of East Lab and east of West Lab. The wall is in West Lab.

Epilogue Ia is a scene. Epilogue Ia begins when the player is in West Lab.
When Epilogue Ia begins: say “Starting the epilogue!”

Going east is acting finally. Waiting is acting finally. Closing door AB is acting finally. Examining the wall is acting finally.

Instead of doing something when not acting finally during Epilogue Ia :
say “nope.”[/code]

I’m partial to the “instead of doing anything except ___” phrasing.

Thanks for all the useful answers!
However when I try to compile this Going west is EPIa-allowed. Waiting is EPIa-allowed. Closing door AB is EPIa-allowed. Examining the wall is EPIa-allowed. Going east is EPIa-allowed. Looking is EPIa-allowed. Instead of doing something when the current action is not EPIa-allowed during Episode Ia, say "Nope.", I get the error message “this condition did not make sense” (a rule taking effect only ‘when the current action is not EPIa-allowed during Episode Ia’). What’s wrong here?

How would this look when implemented? I’ve tried some variations but couldn’t get it to work…

I see you have “Episode Ia” as the name of the scene–did you change the name of the scene or is it supposed to be “Epilogue Ia”?

Well isn’t that embarassing… :unamused: Sorry for the inconvenience. :wink:

:smiley: It’s easy to get caught that way. I have a uservoice suggestion for Inform to flag words that only appear once in the source text, so it could say something like “I see you wrote ‘episode/epilouge’ in this line that I can’t understand, and it appears nowhere else in the source text, so you might want to check if that’s the word you want.”