Pathfinding trouble multiple units

0 favourites
  • 5 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • 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).

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)