constantly counting each enemy instance's distance

Get help using Construct 2

Post » Thu Mar 05, 2015 11:48 am

Hy, how can i constantly count the distance between each enemy instance and the player so that at certain value i can trigger events for instances individually?
B
6
S
1
Posts: 35
Reputation: 476

Post » Thu Mar 05, 2015 12:20 pm

Use For Each on each enemy and check the distance using distance(player.x,player.y,enemy.x,enemy.y)

The manual is your friend.
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Thu Mar 05, 2015 12:31 pm

Ok, thanks.
B
6
S
1
Posts: 35
Reputation: 476

Post » Thu Mar 05, 2015 4:34 pm

Upload a file .capx for help you.
B
48
S
9
G
10
Posts: 200
Reputation: 8,258

Post » Thu Mar 05, 2015 8:00 pm

I need to make a simple enemy AI for a side scrolling beat'em up.. could you help me? Thanks.
B
6
S
1
Posts: 35
Reputation: 476

Post » Thu Mar 05, 2015 10:25 pm

I don't see the file .capx, would like to have it, if you can put it up here.
Thank you
renny
B
7
S
1
Posts: 53
Reputation: 535

Post » Fri Mar 06, 2015 2:46 pm

..........
Last edited by cristixxx on Fri Mar 06, 2015 7:10 pm, edited 2 times in total.
B
6
S
1
Posts: 35
Reputation: 476

Post » Fri Mar 06, 2015 7:07 pm

sadsack wrote:I don't see the file .capx, would like to have it, if you can put it up here.
Thank you
renny

Here is the capx.
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 35
Reputation: 476

Post » Sat Mar 07, 2015 1:12 pm

Still no help? Anyone?
B
6
S
1
Posts: 35
Reputation: 476


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, aldi45mts, Aquanex2 and 8 guests