path_index;
Returns: ID
All resources in GameMaker: Studio have a unique identifying number, and the path_index is a read-only variable that holds the index value for a given path resource. If the instance has no
path assigned, the variable will be set to -1.
if path_index = -1
{
path_start(pth_enemy3, 4, path_action_reverse, 0);
}
The above code checks to see if a path has been assigned to the instance, and if not it starts a new path (assigning it to the path_index at the same time).