当实例到达当前路径的末尾时,此变量可用于获取或更改实例的反应。通常,当您使用path_start()启动路径时会设置此值,但您可能希望根据游戏中的任何事件数来更改此行为。可用值用以下常数表示:
路径结束动作常量 | |
---|---|
常量 | 描述 |
path_action_stop | Stop the path |
path_action_restart | Continue from start position, jumping to the start if the path is not closed |
path_action_continue | Start the path again from the current position |
path_action_reverse | Reverse the speed of the path (run the path in reverse) |
path_endaction;
if (path_endaction == path_action_stop)
{
path_endaction = path_action_reverse;
}
上面的代码将检查路径结束操作,如果设置为停止,则结束操作将更改为反向。