I7: programmatically creating scenes

We can’t create scene kinds or create scenes from tables as we can with objects and values, but I’m curious if there’s still a way to create scenes from tables; something like this:

When play begins:
    repeat through the Table of Scenes:
        [scene entry] is a scene;
        [scene entry] begins when [begin-condition];

Nothing has worked so far – any ideas?

I’m not sure I can be very helpful on this (sorry), but I’m curious about something. Were you intending your table idea simply as a time-saver (to accumulate all the scenes and conditions in one place for easy reference) or were you intending to write to the table during gameplay (to try changing entries such as “[begin-condition]”, etc)?

Well that’s funny – it started as the former, but as I played with it it became the latter! I’m not quite sure what kind of game that would turn out to be, but it seems like an interesting path to go down.

Can’t be done, I’m afraid. Scenes have to be defined at compile time, and that means they have to be at top level, not inside a rule or phrase as you’ve done here.

Defining them with a table isn’t supported either. “Condition” is a kind of value, so you can’t put the begin or end condition in a table, at least without special help from the compiler (like how “topic” isn’t a kind of value either, but you can still have topic columns).