Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.rwth-aachen.de!uni-paderborn.de!golden-gate.owl.de!fu-berlin.de!main.Germany.EU.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!tank.news.pipex.net!pipex!oleane!jussieu.fr!math.ohio-state.edu!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: [inform] multiple object descriptions
Message-ID: <erkyrathDwF3zB.K7v@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <Pine.SOL.3.95.960819190433.24722E-100000@ascc.artsci.wustl.edu>
Date: Tue, 20 Aug 1996 03:49:59 GMT
Lines: 29
Sender: erkyrath@netcom4.netcom.com

Mark J Tilford (mjtilfor@artsci.wustl.edu) wrote:

> In inform, how could one set things up so that each object would have a
> different description depending on what player object handled it, as in
> Suspended.  Would it be easier to set up each object with n descriptions,
> or make n copies of each object and move each object the same?

The former. Make a description property which is a function containing a 
switch statement.

  description [;
    switch (player) {
      tron: "It's my electrofrisbee.";
      marvin: "It's a round piece of plastic trash. It glows cheerily, \
        and I don't have to tell you how that makes me feel, do I?";
      artoo: "Fweep bwoop fweedle!";
      default: "[BUG: invalid player.]";
    }
  ],

Moving several identical objects around in synch is a pain in the 
butt. And it might go wrong.

--Z

-- 

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