How do I pathfind around objects own instances

Get help using Construct 2

Post » Sat Oct 03, 2015 2:55 pm

so.. i have a for example a car.

that car has pathfinding.

there are other car instances on map. i want every single car to get to the point where it was set to go, but avoiding his own instances (of the same object).

how do i do that? is it even possible? when i set solids and added solid, they were just standing not moving at all. when i removed they were moving, but overlapping, and i don't want to use custom movement push because it looks wierd.

any ideas? (p.s. regenerating object obstacle tree isn't a problem)
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450

Post » Sat Oct 03, 2015 3:50 pm

Sounds like a problem inherent to the pathfinding concept.
Moving objects can not (should not) be taken into consideration for pathfinding obstacles.

There are some options to prevent the overlapping, one I use often is the "push out solid" behavior.

There is a push out solid in the custom movement behavior, and Rex also has one with his plugins.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sat Oct 03, 2015 4:42 pm

lennaert wrote:I use often is the "push out solid" behavior.

There is a push out solid in the custom movement behavior


That is the best tip I have read all week. Thanks! @lennaert!

I have been pulsing an overlap collision sensor, and adding custom movement to my AI so they do not overlap.

Thanks!
B
29
S
8
G
4
Posts: 767
Reputation: 5,985


Return to How do I....?

Who is online

Users browsing this forum: ST314, tarek2 and 29 guests