action.tfile | source file

**************************************************************************** action.t This module forms part of the adv3Lite library (c) 2012-13 Eric Eve

Summary of Classes

`Action IAction LiteralAction LiteralTAction NumericAction NumericTAction PostRestoreObject PostUndoObject PreRestartObject PreSaveObject SystemAction TAction TIAction TopicAction TopicTAction TravelAction VerifyResult`

Summary of Global Objects

(none)

Summary of Global Functions

`askChooseObject askMissingObject execNestedAction nestedAction nestedActorAction noHalt notePronounAntecedent replaceAction replaceActorAction tryImplicitAction tryImplicitActorAction`

Global Functions

`askChooseObject (action, role, msg)` | `action.t[3251]`

This function displays msg, which should be a message inviting the player to choose a suitable object for action in role (DirectObject, IndirectObject or AccessoryObject). The action will then be performed using the selected object in role.

`askMissingObject (action, role)` | `action.t[3093]`

Ask for a missing object to fulfil role in action. First see if there's a uniquely best match to fill the role, and if so execute the action with that object. Otherwise ask the player to supply an object.

`execNestedAction (isReplacement, actor, action, [objs])` | `action.t[2965]`

Execute a fully-constructed nested action.

'isReplacement' indicates whether the action is a full replacement or an ordinary nested action. If it's a replacement, then we use the game time taken by the replacement, and set the enclosing action (i.e., the current gAction) to take zero time. If it's an ordinary nested action, then we consider the nested action to take zero time, using the current action's time as the overall command time.

'isRemapping' indicates whether or not this is a remapped action. If we're remapping from one action to another, this will be true; for any other kind of nested or replacement action, this should be nil.

`nestedAction (action, [objs])` | `action.t[2944]`

Run a nested action for the current actor.

`nestedActorAction (actor, action, [objs])` | `action.t[2938]`

Run a nested action; execution of the parent action continues once the nested action is complete.

`noHalt ( )` | `action.t[1542]`

This function can be called from a check nethod to prevent the display of text from within the check method halting the action. Calling it from anywhere else will have no effect. It's use is in conjunction with the TAction class defined immediatelty below.

`notePronounAntecedent ([objlist])` | `action.t[3350]`

Note the objects in objlist as potential pronoun antecedents

`replaceAction (action, [objs])` | `action.t[2913]`

Run a replacement action.

`replaceActorAction (actor, action, [objs])` | `action.t[2923]`

Run a replacement action for another actor.

`tryImplicitAction (action, [objs])` | `action.t[2798]`

Try action as an implicit action with [objs] as its objects

`tryImplicitActorAction (actor, action, [objs])` | `action.t[2878]`

Have an actor other than the current gActor try an implicit action (e.g. if an npc moving as the result of an AgendaItem needs to implicitly open a door to proceed): actor is the actor performing the action, action is the action object to be performs, [objs] is the list of objects (if any) on which the action is to be performed.

Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1