Why does pathfinding affect all instances?

Get help using Construct 2

Post » Tue Jul 16, 2013 11:07 am

I have a minion .. with finding path to target1

When it reaches target1, I ask it to find path to target2.


This minion is spawned at start point every 3 secs... so imagine couple of minions moving in line.

When the first minion reaches target 1, the path changes for ALL the minions.

Shouldn't it only affect that minions path and not the rest in line.


Wondering why?

Minion on collision with target1 ->   find path (target2.X, target2.Y)

should change for all minions.. and not just the one that collided.



Anyone? :)

Thanks for help.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Tue Jul 16, 2013 12:41 pm

Your events are probably wrong, the pathfinding behavior works per-instance. Share your .capx.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,620

Post » Tue Jul 16, 2013 5:03 pm

You may also want to add a "For Each Minion" instead of just minion.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583


Return to How do I....?

Who is online

Users browsing this forum: farsen, gskunk, Kyu, R0J0hound and 56 guests