Message-ID: <3BB1FB9A.BCB053D5@hp.com>
Date: Wed, 26 Sep 2001 10:00:26 -0600
From: Bill Blohm <bill_blohm@hp.com>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: Re: [TADS] die() question
References: <3BB0D1EB.3FBC57D@hp.com> <s7fs7.48918$L%5.32704546@news1.rdc1.sfba.home.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: hpbs7220.boi.hp.com
X-Trace: hpb10302.boi.hp.com 1001520083 hpbs7220.boi.hp.com (26 Sep 2001 10:01:23 -0700)
Lines: 36
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!feed2.onemain.com!feed1.onemain.com!ord2-feed1.news.digex.net!sfo2-feed1.news.digex.net!intermedia!news-out.spamkiller.net!propagator-la!news-in-la.newsfeeds.com!news-in.superfeed.net!local-out2.newsfeeds.com!propagator-SanJose!news-in-sanjose!in.nntp.be!telocity-west!TELOCITY!news-west.eli.net!sdd.hp.com!fc.hp.com!news.cup.hp.com!hpb10302.boi.hp.com
Xref: news.duke.edu rec.arts.int-fiction:92980

Aye, certain rooms, some without choice, others depending on whether or not the
actor insists on pursuing a certain course of action, will result in the death
of the actor automatically. It's not as arbitrary as it sounds, a person using
common sense wouldn't enter those "rooms". Only if you're greedy or foolish.....

Like I said, I knew it was going to have to be something simple that I missed. I
tried the switch function, but it did not take for some reason. Looking over
your example, I had the syntax wrong in the switch() line.

Thanks for keeping me honest!

Bill B.

Kevin Forchione wrote:

>
> So, when the actor enters certain rooms he dies automatically?
>
> myRoom        // death room
>     ...
>     enterRoom(actor) =      // sent to room as actor is entering it
>     {
>         inherited.enterRoom(actor);
>         if (actor.isCarrying(rope))        // or whatever check is necessary
>             global.deathMessage := 1;
>         die;
>     }
>     ...
> ;
>
> replace die
> die: function
> {
>     switch( global.deathMessage )
>     {

