Zelarith's Forum Posts

  • 4 posts
  • Oh, yeah, I should have thought of this as a viable solution.

    But still, it's weird that the documentation stated that multiple pathfind can be run in the background !

    Anyway, thanks for your answers, this should do the trick

  • I can't pick a destination first as I don't know which one of the two destinations is the closest one to me, and, obviously, using the destination's X and Y won't help : I could have a destination 3 px away from me, if I can't reach it without entering a 1000px maze, I would rather go to a destination 100px away from me without walls between us).

    That's why I have to find both of the paths to be able to calculate their costs and then compare the paths length to decide wich one is better.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Up

  • Hello, I'm new to Construct 2.

    I chose to start out building a tower defense like game.

    I would like to be able to have 2 different end point for my critters.

    This means they have to choose between 2 different destination.

    The problem is that, according to construct 2's documentation

    [quote:2tzpcnnt]Find path

    Start calculating a path to a destination in the layout. This is processed in the background and the results are not immediately ready after this action; you must wait until the On path found or On failed to find path triggers run before the result is known or the path can be moved along. If this action is used while Is calculating path is true, the old path is still calculated and the result triggered, but it then immediately begins calculating the new path and will also trigger for that result.

    Wich means Enemy.onPathFound should be triggered twice if I had two different "EnemyTarget", right? The thing is it only is triggered once.

    Here is an exemple :

    Variable1 ends up at 1.

    Variable2 ends up at 2.

    Am I doing something wrong or is the documentation not up to date on this part? Is there a way around this problem?

  • 4 posts