Point
The point is one of the base elements within the project, and can be used as a prefabricated position, or a coordinate record.
Functions
get_point_by_scene_id
Get area by scene ID.
Parameter
Variable | Type | Description |
---|---|---|
scene_id | number | ID in the edit scene. |
Return
Type | Description |
---|---|
region | Region. |
cli.get_point_by_scene_id(scene_id)
get_lua_point_from_py
Create points from py objects.
Parameter
Variable | Type | Description |
---|---|---|
py_point | table | Py layer object. |
Return
Type | Description |
---|---|
point | Point. |
point.get_lua_point_from_py(py_point)
set_collision
Set the collision.
Parameters
Variable | Type | Description |
---|---|---|
is_collision_effect | boolean | Whether the collision is in effect. |
is_land_effect | boolean | Ground collision switch. |
is_air_effect | boolean | Aerial collision switch. |
point:set_collision(is_collision_effect, is_land_effect, is_air_effect)
get_ground_collision
Get the collision type of the map at this point.
Return
Type | Description |
---|---|
number | Collision type of the target point. |
point:get_ground_collision()
get_view_block_type
Gets the view type of the map at the point's location.
Return
Type | Description |
---|---|
number | View type of the target point. |
point:get_view_block_type()
get_point_x
The X coordinate of the point.
Parameter
Variable | Type | Description |
---|---|---|
point | point | Target point. |
Return
Type | Description |
---|---|
number | X coordinate of the point. |
cli.get_point_x(point)
get_point_y
The Y coordinate of the point.
Parameter
Variable | Type | Description |
---|---|---|
point | point | Target point. |
Return
Type | Description |
---|---|
number | Y coordinate of the point. |
cli.get_point_y(point)
get_point_z
The Z coordinate of the point.
Parameter
Variable | Type | Description |
---|---|---|
point | point | Target point. |
Return
Type | Description |
---|---|
number | Z coordinate of the point. |
cli.get_point_z(point)
get_point_by_xy
Convert coordinates to points.
Parameters
Variable | Type | Description |
---|---|---|
x | number | X coordinate of the point. |
y | number | Y coordinate of the point. |
Return
Type | Description |
---|---|
point | Point. |
cli.get_point_by_xy(x, y)
get_point_offset_vector
Point offset in the direction.
Parameters
Variable | Type | Description |
---|---|---|
point | point | Point. |
direction | number | Point of offset direction. |
offset | point | Offset amount. |
Return
Type | Description |
---|---|
point | Point. |
cli.get_point_offset_vector(point, direction, offset)
get_point_in_path
The point in the path.
Parameters
Variable | Type | Description |
---|---|---|
path | table | Target path. |
index | number | Index. |
Return
Type | Description |
---|---|
point | Point. |
cli.get_point_in_path(path, index)