I have defined a HelloTopic and a ByeTopic, both of which are active when the gPlayerChar is in the room, and a DefaultAnyTopic that is active all the time.
When the gPlayerChar and the NPC are in the room, topics work as expected…
There is no AskTopic for ask about the time, so the DefaultAnyTopic text (…that’ll be the day…) is displayed.
But when the gPlayerChar and NPC go into the next room, where the HelloTopic and ByeTopic are not active, the DefaultAnyTopic text is displayed for the missing HelloTopic and a non-existent AskTopic, but not for the missing Bye topic.
The adv3Lite Manual says (adv3Lite/docs/manual/actortopicentry.htm#default_idx)…
…which leads me to expect it to be used for the missing ByeTopic.
Here’s the test bed code…
[code]#charset “us-ascii”
#include <tads.h>
#include “advlite.h”
versionInfo: GameID
IFID = ‘445C38A3-AD1B-4729-957A-F584600DE5C1’
name = ‘test’
byline = ‘by Jerry Ford’
htmlByline = ‘by
Jerry Ford’
version = ‘1’
authorEmail = ‘Jerry Ford jerry.o.ford@gmail.com’
desc = ‘Testing DefaultAnyTopic.’
htmlDesc = ‘Testing DefaultAnyTopic.’
;
gameMain: GameMainDef
initialPlayerChar = me
paraBrksBtwnSubcontents = nil
;
me: Actor ‘me’ @room
“The main man.<.p>”
isHim = true
person = 2
actorAfterTravel(traveler, connector)
{
if(connector == nextRoom)
otherGuy.moveInto(nextRoom);
else if(connector == room)
otherGuy.moveInto(room);
}
;
room: Room ‘room’
“The room. <.p>”
east = nextRoom
;
nextRoom: Room ‘next room’
“The next room.<.p>”
west = room
;
otherGuy: Actor ‘other guy;;man person;him’ @room
desc = “<<otherGuy.theName>> stands in the middle of the room. <.p>”
;
- HelloTopic
“Howdy, doody, pardner, <<otherGuy.theName>> drawls. <.p>”
isActive = gLocation == room
; - ByeTopic
“Well, now, got to be gittin’, <<otherGuy.theName>> says laconically.<.p>”
isActive = gLocation == room
; - DefaultAnyTopic
“Yep, that’ll be the day, <<otherGuy.theName>> says. <.p>”
;
[/code]
Jerry