Pathfinding trouble multiple units

Get help using Construct 2

Post » Tue Feb 05, 2013 2:48 pm

Early stages of MOBA style game, trying to get minions to travel from one tower to the next using pathfinding behaviour.
3 minions on each side travel to the first tower no problem, then when I change their target then to second tower, only one of the 3 minions travels.

Discmach2013-02-05 14:50:02
B
15
S
5
G
2
Posts: 154
Reputation: 3,076

Post » Tue Feb 05, 2013 3:02 pm

My guess is it's because of your use of "trigger once" conditions.

As I see it, when the first blue minion gets to the first tower, he triggers the "On pathfinding arrived, bluepathfinder=1" condition, and increments his own bluepathfinder variable to 2.

He then matches the following condition, "Bluepathfinder=2, trigger once", and sets about finding a path to the second tower.

However, when any subsequent blue minions arrive at the first tower, they increment their own bluepathfinder variable to 2, but never fire the second action to plot a path to the second tower, because it's already been triggered once (by the first minion to get there).
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Tue Feb 05, 2013 3:42 pm

If i take away the "trigger once" addition from the pathfinder 2 variable... the minions all travel to tower one... and carry on moving til the edge of the screen. and then stop.
Which makes absolutely no sense lol
I will upload the .capx

EDIT cant upload capx onto here as edited hyperlink because of low reputation points :/

http://dl.dropbox.com/u/123274811/moba%20test.capxDiscmach2013-02-05 15:48:44
B
15
S
5
G
2
Posts: 154
Reputation: 3,076

Post » Tue Feb 05, 2013 7:44 pm

How about?
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Tue Feb 05, 2013 11:55 pm

Using your method and something i tweaked it has worked:D

On pathfinding arrived   -    Stop
        +                      +
Bluepathfinder=1             Set bluepathfinder to 2


Using your inverted pathfinding moving along path, and "stopping" the object once it "arrives" seems to work.
If this explanation confuses anyone ill post a picture :)
B
15
S
5
G
2
Posts: 154
Reputation: 3,076


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest