Harry, Harv and Lolita are in the hallway. Harry goes north, which causes Harv and Lolita to start following. In the waiting room (through the north passage), Aaron is waiting. There is a FollowAgendaItem in aaron.t.
When all of the rooms are connected directly, by a simple dir = dest, things work as expected. Harry goes north to the waiting room and Harv and Lolita follow him. In the waiting room, Aaron takes the lead and all three characters follow him through to the end of the chain of rooms defined by the FollowAgendaItem.
But when I change the north = secondRoom directive, which is the first passage after Aaron takes the lead, to a north: TravelConnector, things fall apart.
Harry goes north, Harv and Lolita follow, they meet up with Aaron, who says “follow me” but when Harry goes north through the travel connector, we lose Aaron. Harv and Lolita follow as expected, but Aaron has dropped out.
Actually, this is how it’s working in my test bed.
In the game, which is a bit too complex to post here, nobody gets through the travel connector. In the game window, there’s just a blank line. But tracing through the debugger, I see an exception getting thrown in execCycle(cmd) in action.t…
/* If an exit signal is issued we skip to here. */
catch(ExitSignal ex)
{
/*
* If the exit macro is used in the course of the command,
* consider the command a failure.
*/
actionFailed = true;
}
I have not been able to track down what is causing this exception, but it halts travel for all of the characters.
Here’s the transcript of play in my much smaller test bed, without a travel connector, with Aaron leading the way through all of the rooms…
…and here it is with the travel connector, in which Aaron drops out after the group passes through the travel connector between the waiting room and the second room…
…and here’s the code, with the travel connector temporarily commented out and north = secondRoom directive live…
[code]#charset “us-ascii”
#include <tads.h>
#include “advlite.h”
versionInfo: GameID
IFID = ‘243748b1-5310-4916-8436-890e9ccc16fd’
name = ‘test’
byline = ‘by Jerry Ford’
htmlByline = ‘by
Jerry Ford’
version = ‘1’
authorEmail = ‘Jerry Ford jerry.o.ford@gmail.com’
desc = ‘Testing FollowAgendaItem’
htmlDesc = ‘Testing FollowAgendaItem.’
;
gameMain: GameMainDef
/* the initial player character is ‘harry’ */
initialPlayerChar = harry
paraBrksBtwnSubcontents = nil
usePastTense = true
;
// harry, main character
harry: Actor ‘Harry;;man self’ @hallway
“Harry. <.p>”
globalParamName = ‘harry’
isHim = true
isInitState = true
person = 3
proper = true
;
hallway: Room ‘hallway’ ‘hall’
“The hallway.”
north = waitingRoom
;
waitingRoom: Room ‘waiting room’
“The waiting room. <.reveal greenLight> <.p>”
/*
north: TravelConnector
{
destination = secondRoom
canTravelerPass(traveler)
{
local ret = nil;
if(gRevealed('greenLight'))
ret = true;
return ret;
}
explainTravelBarrier(traveler)
{
"The light on the door was red. <.p>";
}
travelDesc = "The light on the door was green"
}
*/
north = secondRoom
south = hallway
;
secondRoom: Room ‘second room’
“The second room.”
north = thirdRoom
south =waitingRoom
;
thirdRoom: Room ‘third room’
“The third room.”
south =secondRoom
;
// lolita character
lolita: Actor ‘Lolita’ @hallway
“Lolita. <.p>”
contType = Carrier
globalParamName = ‘lolita’
isFixed = true
isHer = true
isInitState = true
ownsContents = true
person = 3
proper = true
bulkCapacity = 5000
beforeTravel(traveler, connector)
{
if(traveler == harry && connector == hallway.north)
{
getActor.startFollowing();
}
}
;
// harv
harv: Actor ‘Harv;him’ @hallway
“Harv. <.p>”
contType = Carrier
globalParamName = ‘harv’
isFixed = true
isInitState = true
ownsContents = true
person = 3
proper = true
bulkCapacity = 5000
beforeTravel(traveler, connector)
{
if(traveler == harry && connector == hallway.north)
{
getActor.startFollowing();
}
}
;
// aaron
aaron: Actor ‘Aaron’ @waitingRoom
“Aaron. <.p>”
isHim = true
globalParamName = ‘aaron’
person = 3
bulkCapacity = 5000
;
// *********** FollowAgenda Items *****************************************
-
FollowAgendaItem
initiallyActive = true
connectorList = [secondRoom, thirdRoom]specialDesc()
{
"Aaron waited for Harry to follow him ";
switch(getActor.getOutermostRoom)
{
case waitingRoom:
"north into the second room. ";
break;
case secondRoom:
"north into the third room. ";
break;
}
}
arrivingDesc()
{
if(nextDirection != nil)
{
"Arron waited for Harry to follow him
<<nextDirection.departureName>>. ";
}
else
“The journey has ended. <.p>”;
}
;
[/code]