Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

thanks! I tried to limit how far the enemies could go from each other, but something didn’t work right and I just had to leave it as it is. Maybe I’ll go back to it and retry. 

(1 edit) (+1)

To help with angling stuff in respect to the player,  your code had 

(pygame.Vector2(1, 0).angle_to(Player.vec2d - self.vec2d))

for pointing towards a player, but you probably wanted 

(Player.vec2d.angle_to(self.vec2d))

This way you had an angle pointing between the player and enemy instead. Something like that would probably help you get the enemies re-aligned as they went further away. I'm sure with a little more experimenting you can make that work right.

There's probably a bit more to investigate but I did find that a bit off while taking a quick peek at the source code, since you rely on the coordinate of the world instead of the coordinates of the two objects.