Skip to main content

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

Yo. Thank you, I did a isometric game. But I don't understand, how do I can use "occupyAStarCell(vGlobalPosition:Vector2)"? In "getAStarPath(vStartPosition:Vector2,vTargetPosition:Vector2)":

a method of "aStar.has_point(idxTarget)" will be False, because idxTarget became "if aStar.has_point(idx): aStar.set_point_disabled(idx, true)". And enemies don't can find way to "player.global_position" thank "aStar.set_point_disabled(idx, true)"

Glad it helped you :)

This is a really old guide of mine, so I don't remember most of the stuff in it anymore. But from what I recall, the naming isn't exactly intuitive. A disabled cell means that there's something occupying it, so we should not use it won't be used as a valid path for the path finding.

When we are right next to the player, then we can check if the cells are connected, and if they are, instead of moving, the enemy will be attacking the player.

I hope this helps!

thanks, but instead I did a check to see if there is an entity in the next tile. However, I have a strange bug, for some reason the enemies "fly around the map" at a random moment on a distant tile