Alright this is straight forward,
My character jumps off of the ground and lands again back on the ground.
What I want to do is Measure how far away from the ground my character has jumped then display that in text.
How can I do this?
Develop games in your browser. Powerful, performant & highly capable.
Here's one way:
global number starty=0
global number miny=0
on jump
--- set starty to player.y
--- set miny to player.y
on landed
--- set text to starty-miny
every tick
--- set miny to min(miny, player.y)
Here's one way: global number starty=0 global number miny=0 on jump --- set starty to player.y --- set miny to player.y on landed --- set text to starty-miny every tick --- set miny to min(miny, player.y)
Yeah I copied what you said and it only showed up as a 0 in the text once.
image:
Here the example:
https://drive.google.com/file/d/0B9uHUU ... sp=sharing
image: Here the example: https://drive.google.com/file/d/0B9uHUU ... sp=sharing
Thanks man that worked <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">