How do Turns work?

I’m trying an experiment where the player needs to alternate turns with NPCs, but commands like “look” should not end the player’s turn. I was surprised that it seems to. Does TADS have any built-in support for the idea that some actions are “free”? I can see how to keep a turn count variable and make NPCs check it, but it seems hackier than need be.

And how do I get my hands on the turn dispatch mechanism? Ideally if the game works well I’d like to write a turn queue to control when things happen.

The first place to look would be in the Technical Manual, in the article called “The Command Execution Cycle.”

See also system action class in the library. There you will find how actions like save won’t consume time if it is what you mean.

[code]class SystemAction: IAction
// …

/* system actions consume no game time */
actionTime = 0

;[/code]

Thanks Jim, that article links to runScheduler(), which looks to be what I need to see.

Tomasb, thanks for the tip. I had the idea that, conventionally, actions like “look” or “inventory” weren’t considered to consume any game time. Looking at the code, it seems like that’s not the case in this library at least. Would people say I’m just confused about what the usual convention is?