Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I have a basic enemy pathing system based on the MoveTo behavior.
Every x seconds - Pick a random direction and move there.
But if the enemy hits a solid, it will seldom get stuck. Which is the proper way of doing this?
Use Pathfinding behavior instead.
Every x seconds - find path to a random point. On path found - move along the path.
Hi I am using the move to and pathfinding behavior. I was going to make a new post for this question but maybe I can get some help here.
My problem is when who solid objects collide, they become stuck together and will stop moving because of this.
Check that you have "Stop on solids" disabled in MoveTo behavior.
Also, are you saying that you have Solid behavior on enemies? This is not a good idea, it can mess with pathfinding, you should remove it.
Develop games in your browser. Powerful, performant & highly capable.
Yes I did this to avoid the multiple enemies from getting so close, when this happens they appear to merge and look like one enemy.
Yeah, it's a common issue and there are no 100% working solutions. Making enemies solid is not a good choice.
I have two examples of my own, but they are quite complex and may not work well in your game:
Thanks this is helpful especially for a tower defense or game like warcraft 3, something I will attempt later on. I am not sure what I did but I solved my issue by making the enemy move on the 8-movement vector plane on every damage, and when they collide they can stop the move-to behavior, now it seems to be working and I removed the solid behavior. I am making a sort of beat-em up style game.