sm.pathfinder

Pathfinder

Constants:

Functions:

  • getPath
  • getSortedNodes

  • sm.pathfinder.conditionProperty

    Condition link types

    height
    target
    none

    sm.pathfinder.getPath(character, destination, groundPos=true, linkConditions=nil)

    Server only

    Find a path

    Parameters:

    TypeNameDescription
    CharactercharacterThe character to find path for
    Vec3destinationThe path destination
    booleangroundPos=trueIf the destination is ground level
    tablelinkConditions=nilTable of link conditions

    Returns:

    TypeDescription
    tableThe path as table of PathNodes

    sm.pathfinder.getSortedNodes(worldPosition, minDist, maxDist)

    Server only

    Find all nearby path nodes

    Parameters:

    TypeNameDescription
    Vec3worldPositionThe position to look in
    numberminDistMinimum distance around pos
    numbermaxDistMaximum distance around pos

    Returns:

    TypeDescription
    tableTable of PathNodes sorted closest to farthest