An AgendaItem that can be used to trigger actor travel when the actor is waiting for the player character to follow him/her/it.
class
FollowAgendaItem : AgendaItem
Superclass Tree (in declaration order)
FollowAgendaItem
AgendaItem
object
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
agendaOrder
connectorList
nextConnector
nextConnNum
nextDirection
travelBlockReported
traveledThisTurn
Inherited from AgendaItem
:
calledBy
endCondition
executeOnce
initiallyActive
invokedByActor
isDone
isReady
name
Summary of Methods
arrivingDesc
beforeTravel
cancel
execute
invokeItem
noteArrival
registerItem
resetItem
sayDeparting
showSpecialDesc
specialDesc
travelBlocked
Inherited from AgendaItem
:
getActor
invokeItemBase
report
Properties
Give this agendaItem a high priority to make sure it is used in response to a FOLLOW ccmmand in preference to any other AgendaItems that may be pending.
A list of TravelConnectors through which we want the player character to follow our associated actor.
The next connector our NPC wants to lead the PC via
A pointer to the next connector to use
Display our default message. We make use there is a nextDirection before we attempt to use it in our message, otherwise we simply use a bland "X is here."
Flag: did the travelBlocked() method output any text? This is handled internally by the library and shouldn't normally be used by game author code.
Which turn did this FollowAgendaItem last cause our NPC to travel on?
Methods
The specialDesc to use when our NPC has just traveled as a result of this TravelAgendaItem. By default we just show our specialDesc, but game code might want to customize this to something like "Bob crosses the room and waits for you to follow him through the green door."
Give this AgendaItem the opportunity to react to travel; in particular this might be used to allow the NPC to react to or even forbid travel in a direction other than the one s/he's trying to lead the PC.
Cancel this FollowAgendaItem before its normal termination.
An AgendaItem initializer. For each agenda item that's initially active, we'll add the item to its actor's agenda.
This method is invoked when our NPC arrives at his/her destination. By default we do nothing, but instances can override to provide code to handle the arrival, e.g. by changing the NPC's ActorState.
Display a message to say that our actor is leaving via conn. This would normally describe the player character following our actor via conn.
Show a specialDesc for this NPC when this TravelAgendaItem is active. If we've just moved this turn we display the arrivingDesc(), otherwise we show the specialDesc.
The specialDesc to display when our actor is waiting for the PC to follow it. By default we just show a plain vanilla message to the effect, "The NPC is waiting for you to follow him/her north" or whatever, but game code may wish to override this to provide a more customized message.
This method is called when our NPC attempts to travel via conn but the travel is blocked (by a locked door, for example). By default we do nothing here but game code can override this method to display an appropriate message or take any other action that might be needed in this situation.
If this method displays anything, the default "You wait in vain for the traveler to go anywhere" message will be suppressed.
Adv3Lite Library Reference Manual
Generated on 25/04/2024 from adv3Lite version 2.0