On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

That one sounds good but the problem is that formula could cause enemies to walk ontop of towers. I also need these waypoints generated in such a way so that they can try to get out of reach from enemy towers 

(1 edit)

Create a separate object of the same size as the waypoint, and make that object invisible.

Upon creation of this new object:

X: 200 + random(880) for the new object

Y: 200 + random(320) for the new object

Check for a collision against tower:

If new object is in collision with tower,

X: 200 + random(880) for the new object

Y: 200 + random(320) for the new object

else:

Create object waypoint (newobject.x, newobject.y)

Delete the instance of the new object

nice 

(1 edit)

Also, if you want the space surrounding the tower to be avoided as well, create an invisible object that stretches across that whole territory, and have this "New Object" talked about in the previous post avoid that instead of the tower.