Hi,
First of all here is my game I'm working on (created in stencyl3)
http://www.stencyl.com/game/play/20518Here is the thing. I have 4 cars that need to chase the player. Catch him. As you can see and drive to the bottum left corner you see a cop car going from waypoint to waypoint. I created this by added points(actors) to the scene wich when created fill a list with there cordinates and the car follows these cordinates. I have no idea how to proceed.
Here is my Idea...
4 cars, first every car is going to a corner. ( gives the player some time before the chasing begins and the cars are not all together)
Every car has his own behavior.
1. Is going to the players position
2. Is going just above the players position
3. Is going to the end of the line of the players posisiont (end of read), then get player
4. Is going to the beginning of the line of the players position (beginning of road), the get player
As fas as I see it, They need to astablish a new route at the end of the road. but they can't turn on that road so they can't reverse, otherwise they just keep on the same road
I have know idea how to do this. To let them choose a route based on the players position.
I presume I need to fill list with waypoint bases on the player position per behavoir
I found something here but still no idea where to start.
http://www.kirupa.com/forum/showthread.php?43260-ai-in-pacman I'll share the behovoirs when finsish. I think it will be interesting for most of us