I have a very weird problem with the Sine and Pathfinding behaviors

Not favoritedFavorited Favorited 1 favourites
  • 4 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • So, I'm making a horror game and for some reason, my entity's pathfinding behavior ONLY works properly when it has no less than 2 sine behaviors enabled. I've looked multiple times, there is no mention of the sine behavior in the code, the monster didn't even have the sine behavior while I was making its code cause I had no idea it needed it.

    Oh, and not just that, for some reason, the sine behaviors all have to be SPECIFICALLY on the top of the behaviors list, or else it breaks.

    For reference, this monster basically hears sounds the player makes and slowly walks towards them, eventually chasing the player once they spot him.

    Is the pathfinding behavior somehow connected to the sine behavior or something?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Does the Sine behavior change the object’s position? Maybe the object gets stuck in obstacles, and Sine nudges it out — that could explain why the Pathfinding behavior doesn’t work without Sine.

    I think you need to fix your pathfinding grid. See the official documentation:

    construct.net/en/make-games/manuals/construct-3/behavior-reference/pathfinding

  • Does the Sine behavior change the object’s position? Maybe the object gets stuck in obstacles, and Sine nudges it out — that could explain why the Pathfinding behavior doesn’t work without Sine.

    I think you need to fix your pathfinding grid. See the official documentation:

    https://www.construct.net/en/make-games/manuals/construct-3/behavior-reference/pathfinding#internalH1Link0

    I did think of that and it made sense, but when I tried to test it on a completely empty area and made the collision smaller, it still didn't work. But to answer the question, the sine does change the position a bit (it has a magnitude of 1).

    (This is the code for it all btw)

  • Try to avoid running the "find path" action on every tick - like on your first screenshot.

    when I tried to test it on a completely empty area and made the collision smaller, it still didn't work.

    Can you share that test project?

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