• Reference
  • LUA API
  • Classes
  • Path

Path

Path is one of the basic elements in a project, consisting of multiple point links that can be used as unit movement routes.

Functions

get_path_by_scene_id

Get path by scene ID.

Parameter

VariableTypeDescription
scene_idnumberID in the edit scene.

Return

TypeDescription
PathPath of the path.
cli.get_path_by_scene_id(scene_id)

get_lua_path_from_py

Create paths from py objects.

Parameter

VariableTypeDescription
py_pathtablePy layer object.

Return

TypeDescription
PathPath of the Path.
path.get_lua_path_from_py(py_path)

has_tag

Whether the path has a tag or not.

Parameter

VariableTypeDescription
tagstringTag.

Return

TypeDescription
booleanWhether the path has tag.
path:has_tag(tag)

remove_path

Remove path.

path:remove_path()

add_point

Add a point to a path.

Parameters

VariableTypeDescription
indexnumberSerial number.
pointpointPoint.
path:add_point(index, point)

remove_point

Remove a point from a path.

Parameter

VariableTypeDescription
indexnumberSerial number.
path:remove_point(index)

add_tag

Adds a tag to a path.

Parameter

VariableTypeDescription
tagstringSerial number.
path:add_tag(tag)

remove_tag

Remove a tag from a path.

Parameter

VariableTypeDescription
tagstringSerial number.
path:remove_tag(tag)

get_point_count

Get the number of points in the path.

path:get_point_count()

create_path

Create a path starting with a point.

Parameter

VariableTypeDescription
start_pointpointStarting point.

Return

TypeDescription
pathPath to create.
path.create_path(start_point)