How to limit Understand clauses to a specific scene?

I need certain actions be only usable during specific scenes and I’m talking about aliases to the default commands, not the completely custom actions so hacking it with check/carry out/report won’t work in that case. For example I’ve set it up that player can “warn” certain character which amounts to “telling him about danger”, but I only want the action to be usable in certain scene. Unfortunately Inform balks at the code like this:

If the Scene is happening: Understand "warn [someone]" as telling them about "danger".

It wouldn’t make sense for people in other scenes to be warned about anything and as such I want limit certain commands/aliases to specific scenes. How to do that?

You can’t do it in one line, but you can do something like this:

Warning is an action applying to one thing.
Carry out warning:
	[...do something...]
	
Understand "warn [someone]" as warning when Foo is happening.

However, this is generally bad practice. If a player tries “warn” during a different scene and gets an “I didn’t understand that” error, they’re not going to try it again – the game is telling them that that verb isn’t recognized.

Instead, define the “warn” verb (and action) for the whole game, and write check/instead rules which give an appropriate refusal when it’s the wrong time.

I could see a legit use for not understanding an action in part of a game - say halfway through story the player is instructed in magic-use - that would be a reasonable situation for the parser (and the PC) not to understand any of the spellcasting vocabulary until the correct moment in the story after the verbs are spelled out to the player.

Sure, that’s why I said “generally”. :slight_smile: You’d want to think about whether the protagonist should be aware of magic-use at the beginning of the game.

I thought Enchanter was an example of this, but in fact it “leaks” information about spells you haven’t found yet:

:bulb: now the obligatory xyzzy homage changes with scene

(sorry for the little jab in writing my idea in fake-I7 :wink: )

Best regards from Italy,
dott. Piergiorgio.

1 Like