How do I Split the cone of view in line of sight behavior

  • I've been using construct 2 for a couple years messing around and experimenting. I have a game that uses the line of sight behavior and I want to know how to split the cone of view into sections (three at the most)

    it would go like this:

    -player has a cone of view that's 180 deg. and when player has line of sight, I want it to be able to divide it into three chunks. so if the player comes upon the enemy, it will fall somewhere in the three sections (left,forward,right) and then respond accordingly (run left, run forward, run right)

    -I've tried several things but I can't figure out how to get enemy.x and enemy.y within the cone of view sections correctly. Using angles is not really working and I was hoping to avoid pinning a bunch of sprites to the main characters and enemies.

    any help or ideas, no matter how off the wall would be greatly appreciated.

    thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)