zampa
Member
Hi, i'm working on pathfinding for my enemies using the a* system, i created a grid and added all tile instances for walls and pits in the room and i encountered a problem let' say i put a platform surrounded by pits that the player can access, i that case the function mp_grid_path would return false and the enemy would not move, but givven that the is no wall blocking sight for the enemy i would like him to move towards the enemy.
Here are some ideas i came up with to solve this
1) just don't add the pits tile instances to the grid and stop the enemy when he approches a pit (i do not think this could be usefull because it would not help with avoiding said pits)
2) in the case that the player is unreachable start a while cycle that checks for reachable spaces within the line of sight between player and enemys
Are any of these valid solutions? Or is there another easier way
Thank you
Here are some ideas i came up with to solve this
1) just don't add the pits tile instances to the grid and stop the enemy when he approches a pit (i do not think this could be usefull because it would not help with avoiding said pits)
2) in the case that the player is unreachable start a while cycle that checks for reachable spaces within the line of sight between player and enemys
Are any of these valid solutions? Or is there another easier way
Thank you