Line of Sight and pathfinding

0 favourites
  • 6 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I have this.

    This worked until I did some unrelated changes to other object.

    I have tried to look in to every single setting and I can't figure out why it doesn't work.

    Enemies don't even turn or move towards my character.

    Is there a better way to do it?

    EDIT: Also whenever I remove the "line of sight" it instantly works.... trying to figure out why.

    EDIT2: I got ai kind of working by making it follow a different sprite on my player. But it's behaving like a staggering drunk. Need better AI that doesn't constantly have to stop every time it moves to a destination before proceeding again.

  • Until you give us a .capx that we can download to look at exactly how you've done it, we can't really help you that much. Luckily, in my game that I'm currently working on I am also using Pathfinding and Line of Sight in the same way you are; the first thing I'm going to say is that you want to have your "Move along path" action on a different event.

    If you can, do it like this:

    You won't need the "On start of layout: Regenerate Pathfinding obstacle map" if you don't have any obtsacles.

    But like I said, a .capx would really help us to help you!

  • https://dl.dropboxusercontent.com/u/23788876/dd/wtf.capx

    I tried to replicate it. Still doesn't work for me. Is my construct broken?

  • Line Of Sight can not see the origin of an obstacle when that origin is inside the collission polygones. (you made the red one solid, and solids as obstacles).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Line Of Sight can not see the origin of an obstacle when that origin is inside the collission polygones. (you made the red one solid, and solids as obstacles).

    Oh... that explains a lot. Thank you!

    I just thought my character had to be solid to collide with solid...

  • Yesh it has to be solid to do that. Just use Custom obstacles ?

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