how to check the distance

For questions about using Classic.

Post » Sun Jan 27, 2008 3:36 pm

hi i need to check the distance between two objects and i dont know how to do it.I hope you understand me :D
B
1
G
4
Posts: 6
Reputation: 1,037

Post » Sun Jan 27, 2008 6:33 pm

Make the condition 'Compare values' under the System object. Then you can type something like:

Distance(Object1.X, Object1.Y, Object2.X, Object2.Y)
Less than
500

which would check if object1 and object2 are within 500 pixels of each other.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Jan 27, 2008 6:48 pm

[quote="Ashley":qdqe0pk5]Make the condition 'Compare values' under the System object. Then you can type something like:

Distance(Object1.X, Object1.Y, Object2.X, Object2.Y)
Less than
500

which would check if object1 and object2 are within 500 pixels of each other.[/quote:qdqe0pk5]

thank you
B
1
G
4
Posts: 6
Reputation: 1,037

Post » Wed Feb 06, 2008 5:35 pm

i make this Distance.cap for all with look Distance on Text.

http://construct.gamez-interactive.de/e ... ic.php?9.0
B
2
G
4
Posts: 18
Reputation: 1,086


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests