Open main menu

UESPWiki β

AIEscort
AIEscortCell

                AIEscort,     ActorID,         Duration, X, Y, Z, [Reset]
                AIEscortCell, ActorID, CellID, Duration, X, Y, Z, [Reset]

        Where   ActorID         = The target NPC that the source NPC will be escorting.
                Duration        = The length of time (in hours) that the target NPC will be escorting.
                                  A value of 0 indicates infinite time.
                CellID          = Cell name where the source NPC will stop escorting.
                X,Y,Z           = The position that the source NPC will stop escorting the target.
                [Reset]         = Optional parameter, unknown, may indicate whether the current AI package
                                  is interrupted.

        Type:   AI

     Returns:   none

     Example:   AIEscort, Player, 0, 70685, 126106, 835, 0
                AIEscortCell, Player, "Balmora, Hecerinde's House", 0, 70685, 126106, 835, 0

     Scripts:   whiteguarScript (AIEscort)
                Not Used (AIEscortCell)

When the NPC uses AIEscort, the player does *not* get free discretion on the path. The NPC leads the player to the destination, and if the player decides to go somewhere else, the NPC stops and waits for the player -- in simple terms, the player must follow the NPC all the way to the destination. If the duration is 0 it will be ignored. When escorting someone, if the target NPC is attacked, the source NPC will come to their aid. An XYZ position of (0,0,0) is often used for situations where you want to directly control when the NPC will stop following (nospecific location). In this case, the NPC will escort until another AI type command is given to it.

Duration is in hours and not seconds as previously thought and only integers are accepted. So a value of 0.1 will be interpreted as 0.

As with other AI functions, issue this command only once or the results may not be as expected.

AIEscortCell is similar to AIEscort except the target NPC will stop escorting the source NPC (ActorID) at the given position in the named cell.

See Also: AIFollow, GetAIPackageDone, GetCurrentAIPackage