When Harry and Mike meet up with Felipe, Felipe is in the felipeInCourtyard actor state, which has the following specialDesc…
specialDesc="Felipe stood off to the side of the door, a bit wobbly and
with a somewhat blank look on his face. <.p>"
A followAgendaItem is defined for Felipe with these isReady conditions…
isReady = (harry.location == hernandezCourtyard &&
mike.location == hernandezCourtyard &&
felipe.location == hernandezCourtyard &&
gRevealed('filepeRealityCheck'))
When the agenda item becomse active, the following specialDesc is defined…
specialDesc="Felipe stood sullenly in the middle of the courtyard waiting
for Harry and Mike to follow.<.p>";
When I run the game code without adding this item to Felipe’s agenda, the actor state specialDesc is used, which is good.
But when I add the item to Felipe’s agenda, the follow item specialDesc is used even though the isReady flag evaluates to nil (all actors are in the required location, but gRevealed(‘filepeRealityCheck’) is nil).
Felipe should not be waiting for them to follow him until after felipeRealityCheck evaluates to true (which it never does in this test bed, but it does in the game code, after Harry has a conversation with Felipe).
Here’s the code in a testbed environment…
#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 <a href="mailto:jerry.o.ford@gmail.com">
Jerry Ford</a>'
version = '1'
authorEmail = 'Jerry Ford <jerry.o.ford@gmail.com>'
desc = 'Testing actor state conflict with follow agenda item'
htmlDesc = 'Testing actor state conflict with follow agenda item.'
;
gameMain: GameMainDef
/* the initial player character is 'harry' */
initialPlayerChar = harry
paraBrksBtwnSubcontents = nil
usePastTense = true
;
// harry, main character
harry: Actor 'Harry;;man self' @roomA
"Harry. <.p>"
globalParamName = 'harry'
isHim = true
isInitState = true
person = 3
proper = true
actorBeforeAction()
{
felipe.addToAgenda(followFelipe);
}
;
// mike character (tattoo parlor counterman)
mike: Actor 'Mike;tattoo artist clerk barrel-chested barrel chested;man counterman' @roomA
"Mike wore an orange tank top that barely covered a barrel
chest; thick, muscular biceps emerged from the tank top's thin shoulder
straps. Inked artwork covered all visible skin from the jawline and lower ears
downward.
<.p> "
globalParamName = 'mike'
isHim = true
person = 3
bulkCapacity = 5000
attentionSpan = 3
isFollowing = true
;
felipe: Actor 'Felipe;guard henchman' @hernandezCourtyard
"Felipe was a short, stocky Mexican, with close cropped dark hair, a thin
moustache, and puffy cheeks.
<.p> "
globalParamName = 'felipe'
isHim = true
person = 3
bulkCapacity = 5000
attentionSpan = 3
;
// in courtyard
+ felipeInCourtyard: ActorState
name = 'felipeInCourtyard'
specialDesc="Felipe stood off to the side of the door, a bit wobbly and
with a somewhat blank look on his face. <.p>"
isInitState = true;
;
// ********** FollowAgenda items **********************************************
// leading mike and harry across the courtyard
+ followFelipe: FollowAgendaItem
isReady = (harry.location == hernandezCourtyard &&
mike.location == hernandezCourtyard &&
felipe.location == hernandezCourtyard &&
gRevealed('filepeRealityCheck'))
connectorList = [hernandezFrontHall]
specialDesc()
{
if(isDone != true)
{
switch(getActor.getOutermostRoom)
{
case hernandezCourtyard:
"Felipe stood sullenly in the middle of the courtyard waiting
for Harry and Mike to follow.<.p>";
break;
}
}
else
inherited;
}
arrivingDesc()
{
"Felipe motioned Harry to go south into the study, then he started up the stairs,
Mike following close behind him. After they reached the top and
disappeared from view, Harry heard an upstairs door open and
close. <.p>";
}
sayDeparting(hernandezFrontHall)
{
"Harry followed Felipe up the stairs to the east into the house. <.p>";
}
;
roomA: Room 'Room A'
"Now in Room A."
east = hernandezCourtyard
;
hernandezCourtyard: Room 'Hernandez Courtyard'
"Now in Hernandez Courtyard"
west = roomA
east = hernandezFrontHall
;
hernandezFrontHall: Room 'Hernandez Front Hall'
"Now in Hernandez Front Hall"
west = hernandezCourtyard
;