Stop on path, then resume

Posted By: Karakis

Stop on path, then resume - 11/29/20 07:59

Is it possible to make an ai stop at a terminal or other location for a specified amount of time before proceeding to the next node?
Posted By: Dooley

Re: Stop on path, then resume - 11/29/20 20:16

I can't say I have tried it, but I don't see why not. Progress along a path requires the script to move an entity every frame.

If you have a variable that gets triggered on approaching another entity, then you would just not move the entity until, for instance, that variable reaches zero...

Code
path_spline(me,my.x,path_dist);
		
if(my.skill3 <= 0)
{
path_dist += 3 * time_step;
}
else
{
my.skill3 -= 1 * time_step;
}


So when they approach the terminal, or whatever, their skill3 is set to 100 (or some other number) this way it will stop moving along the path while skill3 counts down to 0...
Posted By: Karakis

Re: Stop on path, then resume - 11/29/20 21:55

ahhh I see, so I would play my animation for the worker at the terminal during the countdown process.. I think I got the idea. Thanks!
Posted By: Dooley

Re: Stop on path, then resume - 11/30/20 02:41

Sure thing!
© 2024 lite-C Forums