Message-ID: <3BAAD683.AC09AF77@attglobal.net>
Date: Thu, 20 Sep 2001 22:56:20 -0700
From: Chip Hayes <jwhayes@attglobal.net>
X-Mailer: Mozilla 4.72 (Macintosh; U; PPC)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: Re: [Inform and NPC_Engine] ChangePlayer() really foils things.
References: <6ff8e8e2.0109202017.6733f9c3@posting.google.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 32.100.155.106
X-Trace: 21 Sep 2001 05:53:18 GMT, 32.100.155.106
Organization: Global Network Services - Remote Access Mail & News Services
Lines: 38
X-Complaints-To: abuse@prserv.net
Path: news.duke.edu!newsgate.duke.edu!solaris.cc.vt.edu!news.vt.edu!feed2.onemain.com!feed1.onemain.com!feeder.qis.net!washdc3-snh1.gtei.net!news.gtei.net!newsfeed.us.prserv.net!prserv.net!news3.prserv.net!32.100.155.106
Xref: news.duke.edu rec.arts.int-fiction:92808



Al Biggone wrote:
>
> Hi folks, me again. Had such a good experience here the other day,
> thought I'd ask some more questions.
>
> Have been checking out Herr Lanz's NPC_Engine. Impressive stuff, but
> I've hit a snag. In my WIP, I use ChangePlayer() at the beginning of
> the game to make the player this very complicated object with lots of
> rules and properties, etc. However, after adding NPC_Engine, I get the
> always-in-scope NPC_Engine_Main master object visible in every room.
> If I remove the ChangePlayer() call, this problem doesn't show up.
>
> Anyone else notice this?
>
> Al

Do you use ChangePlayer() in the Initialise routine itself?  If so, that
may be the problem.

I'm using NPC_Engine in a WIP of mine as well, so I experimented with
adding a ChangePlayer() to my Initialise routine (assuming that's what
you're doing) and I had the same problem as you describe.

The NPC_Engine object, which is found_in everyone room of the game by
design, is somehow having its concealed attribute removed if
ChangePlayer() is used in the Initialise routine.

If I recall correctly, however, ChangePlayer() should not be used in
Initialise.  Use the statement player = <newplayerobject> to set a
player to a particular starting object.  See the DEADLINE code of
Volker's for an example (player = detective in that case).

When I used ChangePlayer() in my game AFTER the Initialise routine had
finished, there was no problem with the NPC_Engine object becoming visible.

Chip
