path_speed


描述

You can use this variable to get or to set the speed of a path after it has been started. The speed is the number of pixels along the path that an instance should move each step, when the path node has a speed factor of 100. You can use negative values to signify that the instance should follow the path in reverse.

For functions relating to paths, see here.


语法:

path_speed;


返回:

Real(实数)


例如:

path_speed = -1 + random(2);

The above code will set the instance to travel the path at a random speed between -1 and 1.