Discussions about interactive fiction

I7: Things Not Visible and Gonear with Onions

For reasons of testing, I need to create a debugging command that will
operate rather like ‘gonear’, but with more stuff happening. I need to
move the player and also some other objects to a remote location, and I
need to set a few variables at the same time.

‘gonear’ works for moving just the player. But how does it work? I can’t
find the code anywhere. It’s listed in the Actions Index, but there’s no
inspector button for it, and searching the Documentation for ‘gonear’
yields no results. Turning on rules before doing a gonear reveals that
the only rule being followed is ‘look’ (on arrival in the new location),
so that’s no help.

I tried creating my own teleporting action, but I can’t figure out how
to apply it to things that are in remote locations — that is, to things
that are not _visible_ things (and may not ever have been seen by the
PC). "Teleportation is an action applying to one thing" doesn’t work.

What I want to do is essentially more or less like this:

Carrot-teleportation is an action applying to one thing. Understand
"gocarrot [something]" as carrot-teleportation.

Carry out carrot-teleportation:
      let that-room be the location of the noun;
      move the player to that-room;
      move the carrot to that-room;
      now the carrot is half-eaten;
      say "You and the carrot travel swiftly to where [the noun]
[is-are]…."

I started trying to work this out because of a bug in the MacOS IDE
(which I’ve reported), which is that when actions are repeated — at
least when running Glk — the Replay button and Skein eat one of the
repetitions. Fortunately, in my game the action in question doesn’t have
to be repeated in an uninterrupted sequence, so I have a viable
workaround — but even so, it seems to me that teleportation bundled
with other world-altering actions would be useful. So how would I edit
the code above to allow it?

–JA

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

2 Responses to “I7: Things Not Visible and Gonear with Onions”

  1. admin says:

    Jim Aikin wrote:

    > I tried creating my own teleporting action, but I can’t figure out how
    > to apply it to things that are in remote locations — that is, to things
    > that are not _visible_ things (and may not ever have been seen by the
    > PC). "Teleportation is an action applying to one thing" doesn’t work.

    > –JA

    "Applying to one thing" means "one visible and touchable thing", so it
    is *more* specific than "visible thing". As you know, "visible" means
    "in scope", not necessarily seen by the player. You need to make the
    teleportation action apply to "one visible thing" and use the "[any
    thing]" token. The "any" part essentially moves out – of – scope things
    into scope for the purposes of that action. Try:

    Teleportation is an action applying to one visible thing.
    Understand "teleport [any thing]" as teleporting.

    (There’s an example of this in the manual, but I don’t remember off the
    top of my head which. Search for "[any thing]".)

    Skinny Mike

  2. admin says:

    Thanks, Mike. I knew it was in the manual, but I couldn’t find it
    because I didn’t know where to look, or what syntax I was looking for.

    –JA

    - Hide quoted text — Show quoted text -

    Mike Tarbert wrote:
    > Jim Aikin wrote:

    >> I tried creating my own teleporting action, but I can’t figure out how
    >> to apply it to things that are in remote locations — that is, to
    >> things that are not _visible_ things (and may not ever have been seen
    >> by the PC). "Teleportation is an action applying to one thing" doesn’t
    >> work.

    >> –JA

    > "Applying to one thing" means "one visible and touchable thing", so it
    > is *more* specific than "visible thing". As you know, "visible" means
    > "in scope", not necessarily seen by the player. You need to make the
    > teleportation action apply to "one visible thing" and use the "[any
    > thing]" token. The "any" part essentially moves out – of – scope things
    > into scope for the purposes of that action. Try:

    > Teleportation is an action applying to one visible thing.
    > Understand "teleport [any thing]" as teleporting.

    > (There’s an example of this in the manual, but I don’t remember off the
    > top of my head which. Search for "[any thing]".)

    > Skinny Mike

Place your comment

You must be logged in to post a comment.