I have this in my code: Every turn when in the Kitchen, say “Sooner or later you have to cook.”
Problem. You wrote ‘Every turn when in the Kitchen’ : but I don’t understand the ‘when/while’ clause, which should name activities or conditions.
I don’t understand why i get an error!
In Writing with Inform, Chapter 9 - Time - §9.5. Every turn, there is an example:
Every turn when in the Orchard, say “The summer breeze shakes the apple-blossom.”
This is the same code…Why my doesn’t work?
I use Inform Build 6L02 on Ubuntu 14.04 - 64 bit.
The syntax changed. Use “when the location is the Kitchen” instead.
The documentation example is wrong, yeah. I’ll note that.
ok, this works, thank you. I saw that “…when the player is in the Kitchen…” works, too.
But what about regions? Something like: “when the region is the Forest” is not correct, or?
Regions, regions… “when the player is in SomeRegion” will work.
(There is no single “region” value, because regions can nest, so you can be in several regions at once. This is not true of “location”, because rooms never nest.)
Thanks, Zarf! I’m still pretty new to all this
Note that there’s a difference: “the player is in the Kitchen” is true only if the player is directly in the room, and not for example when sitting on a chair that’s in the kitchen. “The location” on the other hand always refers to the room.
Right. There’s also “enclosed by the Kitchen” which comes out the same as “location is…”