game.title = "Demo game"; game.author = "Mike Buland"; game.version = 1; game.revision = 0; game.start = <>; global { command: "eat" object { display(object); } } function sillyDisplay( txt, extra ) { display("!~! " + txt + " !~!"); if extra then { display("And then some extra!"); } else { display("...no extra for you"); } } function myGoto( txt ) { display( txt ); goto( txt ); } function getThing() { display( situation.thing ); } situation <> { setup { situation.thing = 55; player.name = "Bob"; name = player.name + "o"; name += " The Man"; display("This is the setup phase for start, " + name); sillyDisplay( "Hello", name == player.name ); getThing(); myGoto( <> ); display("You shouldn't see this."); } enter { display('''This is the enter part of the start situation'''); } } situation <> { setup { situation.thing = "Just a thing"; } enter { getThing(); display('''Entered stuff''' + player.name); count = 0; while count < 5 do { display('thing to count!'); count += 1; } } }