umutgunay's Forum Posts

  • 9 posts
  • Now I've made it as simple as possible. Again, a lot of enemy sprites are stuck like a mouse touching sticky.

  • Hello everyone

    To solve the problem, I prepared a very simple event sheet with very simple sprites. All events are as they appear on the screen. The sprite named Wall has a solid property. When I clicked in front of and behind the wall frequently (when I triggered pathfinding very often in a row), both the sprite I was directing got stuck on solid and the enemy sprites following me got stuck.

    I think the problem is not related to me now.

  • I removed the Solid behavior for the house.

    I added a different solid sprite and placed it invisibly on the map.

    I created the following event and action in case the calculations were wrong:

    On start of layout / regerenate pathfinding obstacle map

    I rechecked all the collision points in all the sprite's animations (all the same).

    I moved the sprite's focal point to the center for all the animations.

    I rechecked all the events and actions.

    Still the problem persists.

    So I added:

    Sprite / On Pathfinding failed to find path / sprite move forward 30 pixels.

    Of course it's ridiculous but at least it pops out when it gets stuck.

    It works but it doesn't look right.

    I'm not happy about this at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Let me make a correction. When I destroy the house in Debug mode, the polygons remain there. That's probably why destroying it doesn't work.

    If the sprite gets stuck and I change its position and move it away from the house, it continues to find its way again.

    By the way, I like the idea of ​​creating masks while I'm behind the house. I'll learn about it.

  • To give details;

    All collision polygons in all animations are exactly the same.

    To understand what is happening there, I added flash behavior to the sprite and;

    -Event:

    * Sprite on pathfinding failed to find path

    * Is overlopping House

    - Action:

    * Start Flash.

    I ran it in debug mode. When the sprite is squeezed by the house, it cannot find the path, and flash is activated. However, when I destroy the house, flash does not work and the character does not move anymore.

  • I tried with the following values:

    ________

    Cell Size: 16

    Cell Border: 80

    It worked but it was too far from home.

    ________

    Cell Size: 32

    Cell Border: 20

    It worked but it was still too far from home.

    ________

    Cell Size: 16

    Cell Border: 10

    It didn't work, it got stuck.

    ________

  • There is a sprite with pathfinding behavior that is visible in the video and there is a house sprite (with solid behavior). The other things that are visible are on different layers.

    When I tried like this, it was jamming:

    Cell Border: -1

    Then I read on the forum that as you increase the number, the sprite stays further away from the solids. So I increased the number but nothing changed.

  • I thought this forum was active

  • Sprites with pathfinding behavior get stuck when they collide with layers.

    I have tried all the suggested solutions:

    Cell Size: 16

    Cell Border: 50

    Obstacles: Solids

    I made a video:

    uploadnow.io/f/r7jR60w

    Tagged:

  • 9 posts