Help with enemy A.I?

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hey, so I've already posted something similar for assistance but I'm afraid that its too much of a clustered post.

    So, I recreated a more streamlined version of my problem.

    I'm trying to have the enemy move back and forth between places unless the player is in line of sight. If the player is in line of sight, the enemy will chase the player.

    I have created two objects that tell the enemy to move back and forth to locations.

    That part works fine.

    Its when the player (Green) interferes, and the chase ensues, that's the issue.

    It seems to get stuck on solids instead of listening to the trigger that I put.

    Especially if the player goes right against the block, and leaps over.

    The enemy is supposed to listen to the triggers once the player is out of sight.

    Why isn't this working?

    I feel as if I covered my bases, but surely there's something I'm missing. :/

  • Hey mate, it looks as though you don't have any events that cover if the player breaks line of sight.

    The first two are collision conditions and the next two are for when the enemy has line of sight. Add one more and inverse the "has line of sight" and set it to a new trigger.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, man. Thanks, but I tried that.

    I fixed the issue, already. Used 'On Collision'' instead of 'Is overlapping'.

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