Open main menu

UESPWiki β


AITravel

                AITravel, X, Y, Z, [reset]
                
        Where   X,Y,Z           = The exterior position for the NPC to travel to.
                [Reset]         = Optional parameter, unknown, may indicate whether the current 
                                  AI package is interrupted.

        Type:   AI

     Returns:   none

     Example:   AiTravel, 1900 -2146 -173 0
                "adaves therayn"->AiTravel, 10199, 1945, 100

     Scripts:   lookoutscript (good example of making Fargoth move around)
                dulniScript
                tarenScript

Starts the NPC to travel to the given exterior position. The distance to the new coordinates cannot be too great (about 3000-4000 units), or the actor will not react, although this maybe related to trying to move the NPC to another cell (which often has problems). Use GetAIPackageDone function to determine when the actor reaches destination. Note that sleeping, teleporting, or fast travel will cause the actor to warp to the end-coordinates, but the GetAIPackageDone function will not fire - this can be a problem. The Z coordinates need only be approximate and all values must be literal, no variables accepted. AIpath grid helps, but is not mandatory.

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

See Also: AIEscort, AIFollow, GetAIPackageDone, GetCurrentAIPackage