A Few Questions About TravelMessages (and the like)

Alright, so I’m pretty new to TADS 3, but I have found Eric Eve’s TADS 3 Tour Guide pretty helpful so far. There’s one thing that I just can’t find in any documentation, however, and that’s how to get travel messages to work the way you want them to.

My problem is that I want a little description for traveling between pretty much all the rooms so that it doesn’t feel like your character is just teleporting between rooms, but I also want an accompanying npc to be able to travel with you. When I set a sayDeparting message for the npc, it says something like “Bob trails along behind you. You follow the dirt road into the forest.” instead of "You follow the dirt road into the forest. Bob trails along behind you. " which makes much more sense to me. I figured that this is what sayArriving would do, so I tried it only to find that sayArriving does not appear to do anything no matter where I travel or what I do. Am I missing something about travelMessages or ActorStates?

In a similar vein, I can’t figure out how to make enterables and doors work with accompanying npcs when I want a message to be displayed to narrate the room transition (similar to a TravelMessage). I previously overrode the dobjFor(TravelVia) method with a double quoted string containing my message (followed by inherited(); of course), but this caused the message to print twice, once when the pc travels through the door and once when the npc travels through it.

I’m pretty stuck right now and have been working on this for over five hours, so any help would be greatly appreciated. Thanks in advance!

Hey there, rushing off to work in a matter of minutes, so I can’t answer thoroughly… your accompanying NPC problem is talked about in the final section of the article ‘Manipulating the Transcript’ in the Tech Manual. Otherwise the TravelWithMessage mix-in class can be added to a Door (I think) to get your travelDesc property. The Tech Manual article also mentions an extension called smartAccompany.t which I have never had the occasion to look for yet, but you might find it. Gotta go for now, good luck!

1 Like

Thanks, that worked like a charm! The solution being in the technical manual explains why I had not seen it, since the technical manual always seemed… well, too technical for me.

For those possibly having similar problems, the section in the manual that John mentions offers a piece of code that seems really advanced and uses objects and syntax I didn’t even know existed in TADS, but you can pretty much just copy paste it anywhere in your .t files and it should work. As for the TravelWithMessage solution, this works great as well, there are just so many classes and functions that deal with travel that it’s hard to determine which is the one you want to mess with.

Thanks again!

1 Like