sm.pathfinder.getPath

Find a path

Kind: Function

Environments: Game

Game

sm.pathfinder.getPath( character, destination, groundPos, abilities, costs )

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
character Character The character to find path for
destination Vec3 The path destination
groundPos (optional) boolean If the destination is ground level (ignored if nav mesh is used) (Defaults to true)
abilities (optional) table Table of actor abilities { canWalk=boolean, canSwim=boolean }. Defaults to character abilities.
costs (optional) table Table of traverse area costs [1-10] { ground=number, water=number, chemicals=number, oil=number, lava=number }. Defaults to default costs.

Returns:

Type Description
table The path as table of PathNodes