Enemy AI Script Help

The problem is that im making a towerdefence game, and i want to make the mobs go from the spawn to a point, and then on to the next point:)

Thanks :slight_smile:
Jonas

First, you need a list of “waypoints”. This gives you a “path” to follow. First, have your mob turn and look straight at the next waypoint. You simply then translate each frame a small amount towards a waypoint, then check to see if that waypoint is behind the mob. If it is, simply turn to the next waypoint and start heading towards it. If you run out of waypoints, then it wins.

or you can use itween: iTween for Unity by Bob Berkebile (pixelplacement)