0 Favourites

Pathfinding trouble multiple units

  • 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.

    <img src="http://img802.imageshack.us/img802/5436/minionsporlbme.jpg" border="0" />

  • 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).

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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 :/

    dl.dropbox.com/u/123274811/moba%20test.capx

  • How about?

    <img src="http://i47.tinypic.com/21bjbz4.jpg" border="0" />

  • 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 :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
105 16,954
Magistross's avatar
Magistross
Unread hot topic
0 Favourites
Isometric multiple floors
74 9,718
eleanorawesome's avatar
eleanorawesome
Unread hot topic
0 Favourites
Trouble with pseudo Z axis
34 2,736
Arcticus's avatar
Arcticus