Path Finding

Get help using Construct 2

Post » Wed Aug 14, 2013 8:21 am

I am learning C2 and working on MAZE type of game. Life of me I cannot find the way to enemies chasing player. I have tried hard but sorry I do not know how to. Will someone help me. Please help
B
257
S
42
G
15
Posts: 1,992
Reputation: 41,415

Post » Wed Aug 14, 2013 8:10 pm

This is not for this category. Please move it to the appropriate forum.
Sorry about the username, old account XD
B
14
S
4
Posts: 69
Reputation: 1,404

Post » Thu Aug 15, 2013 2:23 am

Add Pathfinding behaviour to 'Enemy' object.
'Enemy' Find Path To (Player.X, Player.Y)
'Enemy' On Pathfinding Path Found > Move Along Path
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Thu Aug 15, 2013 4:45 am

what plinkie said will work, however i would try and set the "find path" to an "every x seconds" condition. The cpu demand might become too intensive otherwise.
B
43
S
12
G
6
Posts: 446
Reputation: 6,807

Post » Thu Aug 15, 2013 5:19 am

What @Sargas said will work, too. I will usually set it every 0.1 seconds or so to give it that fraction of time be it needs to calculate a new path it the object being chased is always moving. The pathfinding acts rather smoothly then.
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157

Post » Thu Aug 15, 2013 8:40 am

@Sargas
Yes, good thinking!
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Thu Aug 15, 2013 9:21 am

Hey guys you are stars. Thank you so much. God bless you all. Thanks
B
257
S
42
G
15
Posts: 1,992
Reputation: 41,415

Post » Mon Dec 09, 2013 7:09 pm

Apart from me probably :(
Sorry about the username, old account XD
B
14
S
4
Posts: 69
Reputation: 1,404

Post » Mon Dec 09, 2013 8:44 pm

And the point of bumping a 4 month old topic with this remark is?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 10, 2013 8:56 am

Add Pathfinding behaviour to 'Enemy' object.
'Enemy' Find Path To (Player.X, Player.Y)
'Enemy' On Pathfinding Path Found > Move Along Path

plinkie is right
B
257
S
42
G
15
Posts: 1,992
Reputation: 41,415

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests