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
245
S
39
G
15
Posts: 1,946
Reputation: 40,276

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
46
S
15
G
73
Posts: 2,029
Reputation: 43,465

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,802

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
136
S
22
G
8
Posts: 770
Reputation: 14,714

Post » Thu Aug 15, 2013 8:40 am

@Sargas
Yes, good thinking!
B
46
S
15
G
73
Posts: 2,029
Reputation: 43,465

Post » Thu Aug 15, 2013 9:21 am

Hey guys you are stars. Thank you so much. God bless you all. Thanks
B
245
S
39
G
15
Posts: 1,946
Reputation: 40,276

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
245
S
39
G
15
Posts: 1,946
Reputation: 40,276

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Allardje, kang, R0J0hound, Rudi55, Vinterstille and 1 guest