Returns the speed setting of a given path's given defining point.


path_get_point_speed(index, n);

参数 描述
index The index of the path to check.
.n The point identity to check.

Returns: Real.


With this function you can get the speed of the point (as defined in the Path Editor or when you dynamically add a path point using path_add_point()) expressed as a percentage. So, if you have a path point set to 50 in the path editor, this function would return 50 when used.


if path_get_point_speed(c_path, 0) != 100
   path_change_point(c_path, 0, path_get_point_x(c_path, 0), path_get_point_x(c_path, 0), 100);

the above code checks the path point "0" of the path indexed by "c_path" to see if the speed is not equal to 100. If it is not then it sets the speed of that point to 100.

上一页: Path Information
下一页: path_get_point_x
© Copyright YoYo Games Ltd. 2018 All Rights Reserved