Picking Nearest Object With a Particular Value

Get help using Construct 2

Post » Sun Aug 19, 2012 6:59 am

I'm hoping someone can offer me some advice.

I have a scenario where the main character walks around a room. Within the room are multiple objects belonging to the same family (named FindableItems). The family has an instance variable to determine whether the object is "findable".

Among the family's "findable" objects within a certain distance, how can I determine which one is nearest to the main character   Right, now it looks something like this



This results in a lot of false positives as it's not respecting the "findable" variable, and distance from the hero, when choosing the nearest object. I'm sure there's a way to do this that I'm not thinking of. zatyka2012-08-19 07:02:05
B
44
S
13
G
7
Posts: 338
Reputation: 10,389

Post » Sun Aug 19, 2012 9:26 am

Last edited by Yann on Sun Sep 14, 2014 8:59 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Aug 19, 2012 5:15 pm

Thank you very much. That was very helpful.
B
44
S
13
G
7
Posts: 338
Reputation: 10,389


Return to How do I....?

Who is online

Users browsing this forum: Colludium and 26 guests