I have no code for this.
I already googled it, too!
Edited by creators124, 03 June 2012 - 08:27 AM.
Posted 03 June 2012 - 08:26 AM
Edited by creators124, 03 June 2012 - 08:27 AM.
Posted 03 June 2012 - 10:32 AM
path[1,0] = path_get_x(path1,0);
path[1,1] = path_get_y(path1,0);
//path one
path[2,0] = path_get_x(path2,0);
path[2,1] = path_get_y(path2,0);
//path two
if distance_to_point(path[1,0],path[1,1]) < distance_to_point(path[2,0],path[2,1])
{
path_start(path1,speed,0,1)
}
else
{
if distance_to_point(path[1,0],path[1,1]) > distance_to_point(path[2,0],path[2,1])
{
path_start(path2,speed,0,1)
}
}
/*this checks whether the distance to the x and y coord of path1
is smaller than the distance of the other*/
//I think it might work but I don't really know how to make it above 2 paths
Posted 03 June 2012 - 10:57 AM
THANKS!Here is a guess but I don't know whether it will work:
path[1,0] = path_get_x(path1,0); path[1,1] = path_get_y(path1,0); //path one path[2,0] = path_get_x(path2,0); path[2,1] = path_get_y(path2,0); //path two if distance_to_point(path[1,0],path[1,1]) < distance_to_point(path[2,0],path[2,1]) { path_start(path1,speed,0,1) } else { if distance_to_point(path[1,0],path[1,1]) > distance_to_point(path[2,0],path[2,1]) { path_start(path2,speed,0,1) } } /*this checks whether the distance to the x and y coord of path1 is smaller than the distance of the other*/ //I think it might work but I don't really know how to make it above 2 paths
Posted 03 June 2012 - 07:00 PM
Posted 03 June 2012 - 07:03 PM
at the closest point of the path possible!Oh, then where do you want to start it at?
Posted 03 June 2012 - 07:03 PM
path_start(path,0,0,1); path_position = ?? //haven't come up with an equation yet //but with path_position you can skip
Edited by Jlm07, 03 June 2012 - 07:15 PM.
0 members, 0 guests, 0 anonymous users