#Unable to get a path to initiate another path?

4 messages · Page 1 of 1 (latest)

next pelican
#

This is kind of a quick question I suppose, and it probably has some easy way of doing it I'm not aware of, but I'm having trouble getting one path to begin another path after it ends.
I put all of this in the create event of the object following the paths.

`if (instance_exists(o_enemybeetle))
{
path_start(p_formstart, 4, path_action_stop, false); path_end();
}

path_endaction.p_formstart = path_start(p_form1, 2, path_action_continue, false);`

I can also provide a video of what's happening as a result if that's any help, but there's not much code so I suppose I'll just send the code as a start.
Also may be worth mentioning I 1.) have the object close to proximity of the game screen so it shows up, (which I've tested, mostly just to clarify its not me simply not being able to see it) 2.) I also tried to see originally if doing this in the step event would fix anything, which the result was pretty much the same, I also tried to intialize the next path in the step event which did not give any different results.

visual shore
#

path_start(p_formstart, 4, path_action_stop, false); path_end();
this starts the path and immediately ends it

path_endaction.p_formstart = path_start(p_form1, 2, path_action_continue, false);
that part would probably just crash

We can we assign one of the four constants to path_endaction and they change what instance does when it reaches end of the path. We can't put some custom action there

round kettleBOT
#

This variable can be used to get or to change the reaction of an instance when it reaches the end of the current path. Normally you would set this when you start the path using path_start() but you may wish to change this behaviour depending on any number of events in your game. The available values are expressed using the following constants:

visual shore
#

path_position can be used to check if path ended - it goes from 0 to 1, so if it's 1, path is finished (should work for this case, may not for path_action_continue as position is a float)

There's also a convenient Path Ended event in Other category that will trigger every time path ended