[STALKER AIM] What is the problem with the Pathfinding behavior here?

0 favourites
  • 8 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hi everyone!

    I've been trying for some time to make an object "aim" to chase the player's character in a certain area of the game, using the Pathfinding behavior. I've tried in several ways, but I'm not getting it. I've seen a tutorial from Construct itself, but I couldn't.

    Can anyone tell me where I'm going wrong?

    I thank you in advance for your attention and collaboration.

  • Move event number 10 to top level, it doesn't need to be nested under "Every tick".

    It's not possible to guess what the problem is by the screenshot. Add another event "On failed to find path -> Mira set opacity to 20". You will see if the pathfinding can't find the path, in this case try changing cell size/padding, check solid objects etc.

    You may also need to recalculate the obstacles map.

    Also, change Hunt_SalaT2 variable when the path is found, or add another condition to event #8 - "Mira is NOT moving along the path", otherwise it will be trying to finding a new path every tick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Move event number 10 to top level, it doesn't need to be nested under "Every tick".

    It's not possible to guess what the problem is by the screenshot. Add another event "On failed to find path -> Mira set opacity to 20". You will see if the pathfinding can't find the path, in this case try changing cell size/padding, check solid objects etc.

    You may also need to recalculate the obstacles map.

    Also, change Hunt_SalaT2 variable when the path is found, or add another condition to event #8 - "Mira is NOT moving along the path", otherwise it will be trying to finding a new path every tick.

    Thanks, man.

    It still not work.

    The aim is in a free area (without obstacles) and can leave the screen. I've tried it in several ways and, despite being simple, it's not working. :(

  • Is it failing to find path? Or it finds the path, but doesn't move?

  • Is it failing to find path? Or it finds the path, but doesn't move?

    The Aim doesn't move, nor does the opacity change, to warn that it has not found its way.

  • Are you sure that "On Path Found" is triggered? Add some visual indication to this event too. Run in the debug mode, check variables, check if pathfinding is enabled etc. If nothing helps, please post your project file.

  • I am also using the Line of Sight behavior, but without success.

  • Are you sure that "On Path Found" is triggered? Add some visual indication to this event too. Run in the debug mode, check variables, check if pathfinding is enabled etc. If nothing helps, please post your project file.

    Yeah, man. It's triggered.

    Unfortunately I cannot post the CAPX of my game here, as it's a personal project.

    Thanks for everything!

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