What is the right way to tell to AI go on patrol route? (Top Down)

0 favourites
  • 4 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • I need to create a AI patrol (Top Down) that goes through 4 points in a loop. What is the right way to do it?

  • It would depend on what else it should be able to do, and if others are supposed to work in a similar way.

    A suggestion would be to add the object to a family called something like PointFollowers and add the behaviour moveto and a variable MovingTo to that family.

    Add another object called MovePoint and make it invisible, give it a variable called PointID and another one called MoveTo.

    Pointfollowers on collision with MovePoint -> set Pointfollowers.MovingTo = MovePoint.Moveto

    -subevent pick all MovePoint

    pick MovePoint where PointID = Pointfollowers.MovingTo

    action Pointfollowers.MoveTo MovePoint.X MovePoint.Y

    You could even experiment with using the same PointID and add pick random in multiple Movepoints to have the AI take random paths.

    Any object in that family will then follow movepoints as you have set them up.

  • It would depend on what else it should be able to do, and if others are supposed to work in a similar way.

    A suggestion would be to add the object to a family called something like PointFollowers and add the behaviour moveto and a variable MovingTo to that family.

    Add another object called MovePoint and make it invisible, give it a variable called PointID and another one called MoveTo.

    Pointfollowers on collision with MovePoint -> set Pointfollowers.MovingTo = MovePoint.Moveto

    -subevent pick all MovePoint

    pick MovePoint where PointID = Pointfollowers.MovingTo

    action Pointfollowers.MoveTo MovePoint.X MovePoint.Y

    You could even experiment with using the same PointID and add pick random in multiple Movepoints to have the AI take random paths.

    Any object in that family will then follow movepoints as you have set them up.

    Thanks I'll check it out.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)