Find the distance between two objects

Get help using Construct 2

Post » Tue Nov 19, 2013 11:44 am

Hello everyone! I have a project which needs to display the current distance between the player and the starting line. The distance has to display the X-axis between each other instead of X and Y axis. (distance(startingline.x, startingline.y,player.x,player.y) doesn't work as it display both the X and Y axis. Thanks!
B
16
S
6
G
2
Posts: 42
Reputation: 2,554

Post » Tue Nov 19, 2013 12:00 pm

Wouldn't player.x-startingline.x work?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 19, 2013 1:29 pm

What do people learn in maths these days? Calculating differences is taught in elementary school.mindfaQ2013-11-19 13:29:56
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Tue Nov 19, 2013 5:12 pm

distance(startingline.x, 0,player.x,0) ;)
B
28
S
8
G
5
Posts: 429
Reputation: 7,007

Post » Tue Nov 19, 2013 11:08 pm

Got it! Thanks everyone!
B
16
S
6
G
2
Posts: 42
Reputation: 2,554


Return to How do I....?

Who is online

Users browsing this forum: darkrealos, JaredX, Rhindon and 21 guests