How do I Pick Next Closest Sprite

Get help using Construct 2

Post » Thu Aug 25, 2016 3:48 am

Greetings Again,

I am testing out an attack sort of deal where the main character attacks the Main enemy and then moves on to the closest minion enemies.

So far I have the player attack the main enemy, after the main enemy has health = 0 to find a path to the minion enemies. That all works fine.

What I would like to accomplish is to attack the nearest minion enemies. Any suggestions?

Thanks guys and gals
Image
B
21
S
6
Posts: 40
Reputation: 1,357

Post » Thu Aug 25, 2016 7:59 am

System > Pick nearest/furthest ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Aug 25, 2016 4:35 pm

All I see is:

Pick all
Pick by Evaluate
Pick Overlapping Point
Pick by Comparison
Pick nth Instance
Pick Random Instantce

I might be able to get it by comparison with an expression or something? Maybe somehow check the closest sprite?
Image
B
21
S
6
Posts: 40
Reputation: 1,357

Post » Thu Aug 25, 2016 4:53 pm

Sprite> Pick nearest/furthest
ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Thu Aug 25, 2016 6:05 pm

any example?....Sorry, I suck, lol.
Image
B
21
S
6
Posts: 40
Reputation: 1,357

Post » Thu Aug 25, 2016 6:20 pm

ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Thu Aug 25, 2016 11:08 pm

Thanks brotha, I should be able to figure it out with that demo. You the bomb!
Image
B
21
S
6
Posts: 40
Reputation: 1,357


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo and 29 guests