know distance X between two objects

Get help using Construct 2

Post » Wed Jan 18, 2012 8:14 pm

know distance X between two objects, for when
be greater than the distance 10 something happens
B
5
S
1
G
1
Posts: 19
Reputation: 1,088

Post » Wed Jan 18, 2012 8:30 pm

System.compare2values(distance(player.x,player.y,objecttocompare.x,objecttocomaore.y) > 10)
        --> do something
B
29
S
13
G
7
Posts: 740
Reputation: 7,899

Post » Thu Jan 19, 2012 7:31 pm

not working need an example please
B
5
S
1
G
1
Posts: 19
Reputation: 1,088

Post » Thu Jan 19, 2012 8:32 pm

Extract from the how do I FAQ

[quote]General/Misc questions
Checking the distance between two instances - LINK
[/quote]
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
253
S
87
G
42
Posts: 7,040
Reputation: 59,295


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests