TravelActionclass | action.t[1182]

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 verifyObj wasIlluminated`

``

``

Summary of Methods

`doTravel execAction execCycle`

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

Inherited from `ReplaceRedirector` :
`redirect`

Inherited from `Redirector` :
`doInstead doNested doOtherAction`

Properties

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

no description available

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

It's generally possible to undo a travel command.

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

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

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

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.

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

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

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

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

Adv3Lite Library Reference Manual
Generated on 01/03/2024 from adv3Lite version 1.6.2