How do I make enemy to follow me after he sees me?

0 favourites
  • 5 posts
From the Asset Store
Give Sound to the enemies that are part of your game! :)
  • I'm trying to make roguelike dungeon crawler, but i'm having some issues with enemy movement. Sometimes all enemies are triggered by this movement event, even if i'm picking enemy by using distance calculation. I also tried with Line of Sight behavior, but same thing is happening. Also i'm trying to make enemy follow, me even if i have changed my position, but they are still going to the first position, where i was a seconds ago. I think i'm very close to the desired result, but i guess i'm missing something.

    Please run this capx and you will see it. I'm using Roguelike plugin, so to open this project you must download it from here: roguelike-plugin-c2-rot-js-interface_t118452

    CAPX: https://dl.dropboxusercontent.com/u/561 ... ngeon.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try this out: https://www.dropbox.com/s/a9eidnk7fwfvemc/Spotted.capx?dl=0

    This is not helpfull because i'm not using bullet for movement. I know how to make this detection and following when using this kind of movement, but in my case it somehow different

  • I'm trying to make roguelike dungeon crawler, but i'm having some issues with enemy movement. Sometimes all enemies are triggered by this movement event, even if i'm picking enemy by using distance calculation. I also tried with Line of Sight behavior, but same thing is happening. Also i'm trying to make enemy follow, me even if i have changed my position, but they are still going to the first position, where i was a seconds ago. I think i'm very close to the desired result, but i guess i'm missing something.

    Please run this capx and you will see it. I'm using Roguelike plugin, so to open this project you must download it from here: roguelike-plugin-c2-rot-js-interface_t118452

    CAPX: https://dl.dropboxusercontent.com/u/561 ... ngeon.capx

    Haven't tried the roguelike plugin but looks interesting. However from reading the information about it. My guess is that as the player moves you have to update the path finding (He refer to it as the map cell based path) which allows you to calculate a path from one coordinate to another coordinate on the map.

    That the line of sight and distance picking is not working, I would try to double check it and test that your picking is actually working as it is suppose to.

  • I don't know if you solved this problem but i solved this making a sprite over the pg player ( with a different size regarding of the ability of the enemy to see the pg player, like for example a square big 3 or 4 times the pg player sprite) and if the enemy is overlapping this square sprite it means that the enemy saw the pg player....

    I hope this is helpful for you!

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