Understanding checkpoints and control flow

the docs show examples of checkpoints, I’m trying to understand better. does the > mark a checkpoint destination or more like a goto command?

Is a checkpoint like an include in that flow returns to the point before the checkpoint? or is it really like a goto (in 2020!)

are there any other more advanced features in the story format? would appreciate any other pointers or docs.

related topic

Hi @dcsan,

If you put > at the end of a story, this creates a checkpoint. Like here, a checkpoint with name check_asked_question is created:

## first story
* greet
   - action_ask_user_question
> check_asked_question

Once you have a checkpoint defined, you can include it in a story, like this:

## user affirms question
> check_asked_question
* affirm
  - action_handle_affirmation

Don’t overuse checkpoints. It is often best to avoid them.

OK thanks @Arjaan actually that’s kind of odd, it’s almost the opposite of how I would have read that markup. This is how I assumed it worked:

## user affirms question
> check_asked_question .   == define a labelled checkpoint
* affirm
  - action_handle_affirmation

## first story
* greet
   - action_ask_user_question
> check_asked_question  == after the action, then 'goto' the label 

Are you sure?