Discussions about interactive fiction

I7: Indistinguishable & Out of Play

Here’s an odd little coding problem. I wanted to create three pennies
and have one start the game out of play, so that I can then move it
manually into the model world in response to some action. But I can’t
figure out the syntax for moving an out-of-play, indistinguishable
object into play. I tried creating an out-of-play container and putting
it in that, but Inform won’t let me do this:

move the penny in the ghost box to the table;

So how would I accomplish this sleight-of-hand?

–JA

.
posted by admin in Uncategorized and have Comments (4)

4 Responses to “I7: Indistinguishable & Out of Play”

  1. admin says:

    Here, Jim Aikin <midigur…@gmail.com> wrote:

    > Here’s an odd little coding problem. I wanted to create three pennies
    > and have one start the game out of play, so that I can then move it
    > manually into the model world in response to some action. But I can’t
    > figure out the syntax for moving an out-of-play, indistinguishable
    > object into play. I tried creating an out-of-play container and putting
    > it in that, but Inform won’t let me do this:

    > move the penny in the ghost box to the table;

    > So how would I accomplish this sleight-of-hand?

    "Move a random penny in the ghost box to the table", I think. Or
    "Let P be a random penny in the ghost box; move P to the table."

    I’ve got a feature request somewhere to make the definite article work
    the way you originally wanted. "A random <desc>" is an awkward idiom.

    –Z


    "And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves…"
    *

  2. admin says:

    Ah, but it _can’t be_ a random penny. There are only three in the game,
    and two of them are in play, to be found in fairly obvious places. I
    can’t have the game choose one of them at random.

    I guess I could try putting three of them in the out-of-play container
    and then let the game choose one of those three at random. But I ended
    up doing it a different way, using Eric’s Underside extension.

    –JA

    - Hide quoted text — Show quoted text -

    Andrew Plotkin wrote:
    > Here, Jim Aikin <midigur…@gmail.com> wrote:
    >> Here’s an odd little coding problem. I wanted to create three pennies
    >> and have one start the game out of play, so that I can then move it
    >> manually into the model world in response to some action. But I can’t
    >> figure out the syntax for moving an out-of-play, indistinguishable
    >> object into play. I tried creating an out-of-play container and putting
    >> it in that, but Inform won’t let me do this:

    >> move the penny in the ghost box to the table;

    >> So how would I accomplish this sleight-of-hand?

    > "Move a random penny in the ghost box to the table", I think. Or
    > "Let P be a random penny in the ghost box; move P to the table."

    > I’ve got a feature request somewhere to make the definite article work
    > the way you originally wanted. "A random <desc>" is an awkward idiom.

    > –Z

  3. admin says:

    On 3 Dez, 21:45, Jim Aikin <midigur…@gmail.com> wrote:

    - Hide quoted text — Show quoted text -

    > Ah, but it _can’t be_ a random penny. There are only three in the game,
    > and two of them are in play, to be found in fairly obvious places. I
    > can’t have the game choose one of them at random.

    > I guess I could try putting three of them in the out-of-play container
    > and then let the game choose one of those three at random. But I ended
    > up doing it a different way, using Eric’s Underside extension.

    > –JA

    > Andrew Plotkin wrote:
    > > Here, Jim Aikin <midigur…@gmail.com> wrote:
    > >> Here’s an odd little coding problem. I wanted to create three pennies
    > >> and have one start the game out of play, so that I can then move it
    > >> manually into the model world in response to some action. But I can’t
    > >> figure out the syntax for moving an out-of-play, indistinguishable
    > >> object into play. I tried creating an out-of-play container and putting
    > >> it in that, but Inform won’t let me do this:

    > >> move the penny in the ghost box to the table;

    > >> So how would I accomplish this sleight-of-hand?

    > > "Move a random penny in the ghost box to the table", I think. Or
    > > "Let P be a random penny in the ghost box; move P to the table."

    > > I’ve got a feature request somewhere to make the definite article work
    > > the way you originally wanted. "A random <desc>" is an awkward idiom.

    > > –Z

    But the way he’s talking, "random penny" would work, since it’s "a
    random penny *in the ghost box*". You’d be asking the game to choose
    from a random penny in the box to move. Since there’s only one penny
    in the box…

  4. admin says:

    On Dec 3, 12:39 pm, Jim Aikin <midigur…@gmail.com> wrote:

    > Here’s an odd little coding problem. I wanted to create three pennies
    > and have one start the game out of play, so that I can then move it
    > manually into the model world in response to some action. But I can’t
    > figure out the syntax for moving an out-of-play, indistinguishable
    > object into play. I tried creating an out-of-play container and putting
    > it in that, but Inform won’t let me do this:

    > move the penny in the ghost box to the table;

    > So how would I accomplish this sleight-of-hand?

    > –JA

    You could create an unreachable room (call it "Limbo," "Storage," or
    "Elsewhere") and put the third penny in there, then move it at the
    appropriate moment.  Okay, a bit of a cheat, but it’d work.

Place your comment

You must be logged in to post a comment.