Calculate how close an instance of another and return value

Get help using Construct 2

Post » Sat Oct 11, 2014 1:49 pm

How I can calculate how far away is an instance of another and return its value.

example:
I have a player instance and 5instances type monster.
Calculate that instance is closer and return its ID.
B
47
S
12
G
5
Posts: 124
Reputation: 6,851

Post » Sat Oct 11, 2014 2:04 pm

Just use the distance expression, keeping track of the shortest distance.
You do not have the required permissions to view the files attached to this post.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Oct 13, 2014 1:52 pm

@blackhornet Thank you very much! I'll see how I adapt your example to what I need!
B
47
S
12
G
5
Posts: 124
Reputation: 6,851


Return to How do I....?

Who is online

Users browsing this forum: Armench, brunopalermo, dand and 26 guests