global constant number AT_THE_START = 1
global constant number NOT_VERY_FAR = 2
global constant number QUITE_FAR = 3
global number HowFarInStory = 0
System: At start of layout
System: Set HowFarInStory to AT_THE_START
<if certain conditions>
System: Add 1 to HowFarInStory
<etc>
System: HowFarInStory = NOT_VERY_FAR
Function: Call choose("DoNotVeryFarThing1", "DoNotVeryFarThing2", "DoNotVeryFarThing3")()
System: Once while true
else
System: HowFarInStory = QUITE_FAR
Function: Call choose("DoQuiteFarThing1", "DoQuiteFarThing2", "DoQuiteFarThing3")()
System: Once while true
else
...