textbox displays distance between 2 objects

Discussion and feedback on Construct 2

Post » Mon Jun 06, 2016 8:03 pm

Hello experts,

I'm trying to make a simple game... Rocket (block) takes off from surface (rectangle) and textbox shows distance travelled. That's it

I've checked online and found =
Distance(instance1.x,instance1.y,instance2.x,instance2.y)
but don't know how to apply it.

Originally I tried a variable = DIST (distance), but I'm intriged by system action. Here's my capx

http://robfreeman.co.uk/temp/game.capx

rules:
1. Player clicks = TAPS variable adds
2. Bar counts down and when = 0, the rocket (block) takes off.
3. variable "Burnout" starts and counts down from 10.
4. when "Burnout" = 0, I was DIST textbox to display the distance from surface to rocket.

Hope this makes sense.

As you may see, I tried doing this with a variable "DIST", but I cannot get it to stop counting when "Burnout" = 0

Thanks for your time.

Roberto
B
4
S
1
Posts: 57
Reputation: 491

Post » Mon Jun 06, 2016 11:41 pm

if i understand correctly then this is what you probably want

you need version 229 to open it

https://mega.nz/#!vQlmXRgC!PwOczhk4JSOWI8wIJYli19iO-kCQY8q69yzDHuBivJo
Image
B
28
S
11
G
2
Posts: 139
Reputation: 3,299

Post » Tue Jun 07, 2016 4:59 pm

WOW Fidasx, thank you sooooooooo much. Thanks what I envisioned.
B
4
S
1
Posts: 57
Reputation: 491

Post » Wed Jun 08, 2016 1:29 am

no problemos
Image
B
28
S
11
G
2
Posts: 139
Reputation: 3,299


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests