path finding problem

Get help using Construct 2

Post » Sat Apr 12, 2014 9:29 am

Hi. I wanted to know how to make an object path find another object that has the path finding behavior applied to it too. the two objects has the path finding behavior applied but I want one of them to follow the other. The first object will find its way to door or something and it will be chased by another object. when I apply the path finding behavior to the enemy object it just move in the wrong direction and don't follow the main character. I used the "rotate towards position" but this makes the enemy character move through obstacles, and that's not what I wanted.
So how can I fix this?
B
4
Posts: 24
Reputation: 250

Post » Sat Apr 12, 2014 1:21 pm

Not sure how you can make pathfinding objects collide with solids, but making one follow the other is simple.
Pathfinding.png

Not sure what issue you're having but this seems to work.

You might want to make sure the enemy object has obstacles: the default is solids, but anything other than that e.g. physics needs to be manually set at the beginning of the layout.

The other thing is that rotating towards position would indeed rotate towards the player, regardless of the fact there's a wall between them. Thus when the object - which has no collisions - tries to move, even the opposite way, it will move straight through.
You do not have the required permissions to view the files attached to this post.
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Sun Apr 13, 2014 8:32 am

Thanks a lot. I will try that :)
B
4
Posts: 24
Reputation: 250


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests