Pathfinding one family member at a time

Get help using Construct 2

Post » Thu Aug 01, 2013 11:27 pm



So I'm trying to make it so the enemy will move one unit, and only one unit, at a time. But I'm having trouble with this logic.

Say the enemy has 2 units.
Both units, as it stands, move at the same time. When a path is found, it sends one off and then immediately the second one.

How can I manipulate the events so that it will only send the second one off after the first has arrived. And potentially a 3rd, 4rth, 5th unit?

I've been playing with the Family, but I have the hardest time understanding which one it "picks" for each and how I can reference the previous moved unit.
B
10
S
3
G
3
Posts: 47
Reputation: 2,666

Post » Fri Aug 02, 2013 2:07 am

Pick a random enemy and send it to the target. When it arrives, set hasMoved to True, then pick another random one that hasn't moved yet and send it etc.
oneAtATime.capx (r139)
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650


Return to How do I....?

Who is online

Users browsing this forum: jbr190 and 29 guests