TravelAction class | action.t[1217]

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 combineDuplicateObjects 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

`checkActionPreconditions displayStrRet doTravel doTravelViaConn doVisibleTravel execAction execCycle execResolvedAction getOutOfNested noteRetval outOfNestedInstead`

Inherited from `Action` :
`acknowledgeNotifyStatus addExtraScopeItems addImplicitTime advanceTime afterAction announceObject beforeAction buildImplicitActionAnnouncement buildScopeList checkAction 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

`baseActionClass` | `action.t[1219]`

no description available

`canUndo` | `action.t[1477]`

It's generally possible to undo a travel command.

`direction` | `action.t[1474]`

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.

`predefinedDirection` | `action.t[1249]`

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

`checkActionPreconditions ( )`OVERRIDDEN | `action.t[1479]`

no description available

`displayStrRet (loc, dir, dest, val, actor)` | `action.t[1514]`

Flag, do we want to display any single-quoted string returned by the travel method defined on the direction property corresponding to the dir direction on the room loc. dest is the direction of travel, val is the return value, and actor is the actor involved in the travel. By default we do.

`doTravel ( )` | `action.t[1397]`

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[1417]`

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[1449]`

Otherwise if the actor is the player character, display the standard message forbidding travel in the dark.

`execAction (cmd)`OVERRIDDEN | `action.t[1256]`

Execute the travel command, first carrying out any implicit actions needed to facilitate travel

`execCycle (cmd)`OVERRIDDEN | `action.t[1225]`

Use the inherited handling but first make a note of the direction the actor wants to travel in.

`execResolvedAction ( )` | `action.t[1360]`

These methods are provided to allow an IAction to be invoked as an implicit action.

`getOutOfNested (conn)` | `action.t[1316]`

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.

`noteRetval (loc, dir, dest, val, actor)` | `action.t[1504]`

A chance to do something else with the return value of a method, triggered by travel, defined on a direction property of a Room. loc is the room in question (where the travel started from), dir is the directiion of travel, dest is the destination of the travel, val is the return value from the method, and actor is the actor involved in the travel. By default we do nothing here but game code can override.

`outOfNestedInstead ( )` | `action.t[1283]`

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 08/12/2025 from adv3Lite version 2.2.2