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
30
S
13
G
7
Posts: 740
Reputation: 7,944

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
258
S
90
G
48
Posts: 7,083
Reputation: 62,882


Return to How do I....?

Who is online

Users browsing this forum: bambo, Exabot [Bot], Zebbi and 1 guest