How do I teleport to the end of a pathfinding path?

0 favourites
  • 5 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Is there a way anyone can think of to teleport to the end of a pathfinding path without actually moving along it and still fullfill the pathfinding arrived condition. Reason being I find the Pathfinding movement too slow even at very fast settings. I can get the object to teleport to the pathfinding destination end but it doesnt seem to fulfill the pathfinding arrived. Is it because in order for pathfinding arrived to be fulfilled the object must reach each pathfinding node in sequence? Thanks for all and any help in advance.

  • Copy the pathfinding arrived actions into the event triggered to teleport/skip pathfinding. Or use a function and call the function on pathfinding arrived and on pathfinding skipped

  • Yes ended up doing something that is pretty much the same. Thank you for your speedy reply. Do you also know how to find the x and y co-ordinate of the final/any pathfinding node in the sequence?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • construct.net/en/make-games/manuals/construct-3/behavior-reference/pathfinding

    NodeCount

    The number of nodes in the path that was found. This is only updated after On path found.

    NodeXAt

    NodeYAt

    Return the position of a node in the path that was found, in layout co-ordinates, using the zero-based index of the node. This is only available after On path found.

    So Object.Pathfinding.NodeXAt(Object.Pathfinding.NodeCount) and Object.Pathfinding.NodeYAt(Object.Pathfinding.NodeCount)

    This is slightly different than simply storing the target of pathfinding, as if your target is an invalid target, the last valid pathfinding node will be in a pathable location rather than inside a solid object for example.

  • Deadly, thank you very much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)