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
2
G
1
Posts: 19
Reputation: 1,238

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: 8,099

Post » Thu Jan 19, 2012 7:31 pm

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

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
311
S
128
G
100
Posts: 7,413
Reputation: 74,722


Return to How do I....?

Who is online

Users browsing this forum: Ironic Chef, OddConfection, odiusfly and 3 guests