How do I follow enemy

Get help using Construct 2

Post » Sun Jul 17, 2016 10:31 am

How do i follow enemy using pathfinding
when he spotted player he should run and hunt

my example is not working correct
https://dl.dropboxusercontent.com/u/447 ... nding.capx
B
25
S
8
Posts: 215
Reputation: 2,173

Post » Sun Jul 17, 2016 5:57 pm

bump
B
25
S
8
Posts: 215
Reputation: 2,173

Post » Mon Jul 18, 2016 5:17 am

I made a tutorial about it here :
http://bikingame.com/2016/07/02/simpel-ai-101/

it's in Indonesia tough, but you can download the source code.
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
64
S
14
G
2
Posts: 291
Reputation: 6,666

Post » Mon Jul 18, 2016 8:58 am

@puntodamar source code of this example is still avaliable?
i cant find download button
i found only Simple AI 101.capx
B
25
S
8
Posts: 215
Reputation: 2,173

Post » Mon Jul 18, 2016 12:06 pm

If there are no obstacles to go around I probably wouldn't use pathfinding—I've found it always takes a noticeable amount of time to determine the path.

I would use:
LOS - determine when in LOS of player
Instance variable - once spotted change the instance variable (state machine)
If variable then use whatever movement towards player

That should be enough for the basics. After that there are infinite variations in how you want the enemy to chase.
ImageImageImage
B
40
S
23
G
11
Posts: 498
Reputation: 10,062


Post » Mon Jul 18, 2016 7:12 pm

@Lordshiva1948 thanks for advice but i have problem with top down game with 8 direction movement
B
25
S
8
Posts: 215
Reputation: 2,173

Post » Tue Jul 19, 2016 6:34 am

IGDev wrote:@puntodamar source code of this example is still avaliable?
i cant find download button
i found only Simple AI 101.capx


yep. it contains all of the materials i've explained there.
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
64
S
14
G
2
Posts: 291
Reputation: 6,666


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], Kin, ratboy3, tinhofiel, totoe, Yahoo [Bot] and 36 guests