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
12
G
7
Posts: 740
Reputation: 7,849

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,805


Return to How do I....?

Who is online

Users browsing this forum: Callan S, Yahoo [Bot] and 18 guests