TravelActionclassaction.t[1195]

A TravelAction is one that moves (or at least tries to move) the player character from one place to another via a command like GO NORTH, or EAST.

class TravelAction :   Action

Superclass Tree   (in declaration order)

TravelAction
        Action
                ReplaceRedirector
                        Redirector
                                object

Subclass Tree  

(none)

Global Objects  

Go  GoIn  GoOut  KeepGoing  Travel 

Summary of Properties  

baseActionClass  canUndo  direction  predefinedDirection 

Inherited from Action :
actionFailed  advanceOnFailure  againRepeatsParse  allowAll  extraMessageParams  failCheckMsg  failedActionCountsAsTurn  implicitTimeTaken  includeInUndo  isConversational  isImplicit  isRepeatable  oldRoom  parentAction  parentAllowAll  preCond  redirectParent  reportImplicitActions  scopeList  spellingPriority  synthParamID  timeTaken  turnsTaken  unhides  verbRule  verifyObj  wasIlluminated 

Summary of Methods  

doTravel  doTravelViaConn  doVisibleTravel  execAction  execCycle  getOutOfNested  outOfNestedInstead 

Inherited from Action :
acknowledgeNotifyStatus  addExtraScopeItems  addImplicitTime  advanceTime  afterAction  announceObject  beforeAction  buildImplicitActionAnnouncement  buildScopeList  checkAction  checkActionPreconditions  commandNotPresent  exec  execGroup  getAll  getAllUnhidden  getMessageParam  getPostImplicitReports  implicitAnnouncement  reportAction  scoreObjects  setMessageParam  setMessageParams  spPrefix  spSuffix  synthMessageParam  turnSequence  verify  verifyObjRole  wrapObjectsNP 

Inherited from ReplaceRedirector :
redirect 

Inherited from Redirector :
askMissingLiteral  doInstead  doNested  doOtherAction 

Properties  

baseActionClassaction.t[1197]

no description available

canUndoaction.t[1424]
It's generally possible to undo a travel command.

directionaction.t[1421]
The direction the actor wants to travel in. This is placed here by the execCycle method and takes the form of A Direction object, e.g. northDir.

predefinedDirectionaction.t[1227]
Does this TravelAction already define a set direction on its direction property (so we don't need to look to what direction object the command refers)?

Methods  

doTravel ( )action.t[1350]

Carry out travel in direction. For this purpose we first have to define what the corresponding direction property of the actor's current location refers to. If it's nil, no travel is possible, and we simply display a refusal message. If it's an object we execute its travelVia() method for the current actor. If it's a double-quoted string or a method we execute it and make a note of where the actor ends up, if the actor is the player character. If it's a single-quoted string we display it.

Note that we only display the various messages announcing failure of travel if the actor is the player character. We presumably don't want to see these messages as the result of NPCs trying to move around the map.

doTravelViaConn (loc)action.t[1370]
Otherwise, our direction of travel is trying to take us towards nil, a string, or a method, in which case call the nonTravel() function to handle it.

doVisibleTravel (conn)action.t[1402]
Otherwise if the actor is the player character, display the standard message forbidding travel in the dark.

execAction (cmd)OVERRIDDENaction.t[1234]
Execute the travel command, first carrying out any implicit actions needed to facilitate travel

execCycle (cmd)OVERRIDDENaction.t[1203]
Use the inherited handling but first make a note of the direction the actor wants to travel in.

getOutOfNested ( )action.t[1297]
If the actor is not directly in the room, make him/her get out of his immediate container(s) before attempting travel, unless the actor is in a vehicle.

outOfNestedInstead ( )action.t[1265]
If the actor is not directly in the room, treat OUT as a request to get out of the immediate container.

Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1