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

Get help using Construct 2

Post » Sun Jan 29, 2017 10:34 pm

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
B
14
S
3
G
1
Posts: 95
Reputation: 1,015

Post » Sun Jan 29, 2017 11:34 pm

B
15
S
8
G
2
Posts: 68
Reputation: 2,465

Post » Mon Jan 30, 2017 8:56 am



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
B
14
S
3
G
1
Posts: 95
Reputation: 1,015

Post » Mon Jan 30, 2017 12:43 pm

ButcherZV wrote: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.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Sep 19, 2017 10:32 am

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! ;)
B
9
S
2
Posts: 117
Reputation: 1,009


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 21 guests