The order of events is for occurrences and looking is different when the game starts up from subsequent turns. I was hoping I could use an occur to print some initial help messages but it appears below the room description, items and exits when the game starts up. Frustratingly, subsequent entrances to the room give a different order:
Example game:
occur when at one
print "I print a message when in room one."
room one "first room"
exit up two
item junk "some junk"
occur when at two
print "I print a message when in room two."
room two "second room"
exit down one
Transcript:
ScottKit, a Scott Adams game toolkit in Ruby.
(C) 2010-2017 Mike Taylor <mike@miketaylor.org.uk>
Distributed under the GNU GPL version 2 license,
I'm in a first room
Obvious exits: Up.
I can also see: some junk
I print a message when in room one.
Tell me what to do ? u
I print a message when in room two.
I'm in a second room
Obvious exits: Down.
Tell me what to do ? d
I print a message when in room one.
I'm in a first room
Obvious exits: Up.
I can also see: some junk
Tell me what to do ?
The order of events is for occurrences and looking is different when the game starts up from subsequent turns. I was hoping I could use an
occur
to print some initial help messages but it appears below the room description, items and exits when the game starts up. Frustratingly, subsequent entrances to the room give a different order:Example game:
Transcript:
It seems like this should be handled consistently. We could do this easily by removing the
actually_look
call fromprepare_to_play
.