Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TADS3 newb help

34 views
Skip to first unread message

Chris Green

unread,
Feb 3, 2012, 8:46:04 AM2/3/12
to
Hey all,

I'm new here (and to TADS in general), and I've been struggling away
with the guides for a few days and have reached a bit of a dead end.

What I'm trying to do is have a NPC enter a room three turns after the
PC does. I've got a feeling that I need to use "afterTravel" to
trigger a fuse which, when counted down then triggers a
moveIntoForTravel that moves the NPC. Am I at least along the right
lines here, or have I got it hopelessly wrong?

Any help'd be great, thanks.

Chris

Chris Green

unread,
Feb 5, 2012, 10:33:28 AM2/5/12
to
Just a little update. I've spend more time working on this and I can
create a fuse which triggers from the player interacting with a thing
- but I still can't figure out how presentLater or moveIntoForTravel
can be triggered by afterTravel or enteringRoom. If there are any
TADS3 users out there that can lend a hand - I'd be very grateful.

Ben Cressey

unread,
Feb 5, 2012, 1:39:16 PM2/5/12
to
You're on the right track. Here's an example of using afterTravel to trigger a fuse that moves the NPC.

/* ... */
bathroom: Room 'bathroom' 'bathroom'
"Just another bathroom. "
west = bedroom

afterTravel(traveler, connector) {
if (traveler == gPlayerChar && bob.getOutermostRoom != self)
bob.summon(self);
}

;

bob: Person 'Bob' 'Bob'
"It's Bob! "

isProperName = true

summon(loc) {
_targetLoc = loc;
_summonFuseID = new Fuse(self, &_summonFuse, 3);
}

_summonFuse() {
_summonFuseID = nil;
self.moveInto(_targetLoc);
"Bob has arrived! ";
}

_summonFuseID = nil
_targetLoc = nil
;
/* ... */

By the way, most of the TADS 3 activity has migrated over to intfiction.org. You'll likely get a faster response if you join the rest of us there.

Chris Green

unread,
Feb 6, 2012, 3:08:48 AM2/6/12
to
Thanks Ben, that's a great help, I'll check out the new site soon!
0 new messages