distance ran tracker
YourFace710
Member Posts: 13
someone help me with a distance tracker for my endless runner game? thanks a bunch in advanced , i cant seem to get it right
Comments
Create an integer game attribute called Distance.
Extremely simple once you think about it. Hope this helps.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX ok, now the part i was having trouble with is having numbers counting the distance on screen
Is your actor always running or does he stop at any stage during the game ?
@Socks the actor isnt always running he can stop at any time
I see, I was going to suggest using the internal clock, but that's no good if he stops.
As for your question about @Braydon_SFX 's post . . .
"the part i was having trouble with is having numbers counting the distance on screen"
. . . just have a Display Text behaviour that displays game.Distance
@Socks displaying text doesn't seem to work. the text that pops up is "true" also , any suggestions for a actor that doesn't continuously run?
If you use Braydon's code . . .
When game.GameOver is false,
-Timer: every 0 seconds,
--Change Attribute: game.Distance to game.Distance+1.
. . . and if like he says the attribute game.Distance is an integer attribute, and you select that attribute in the drop down menu for your text display it will display game.Distance . . . . it would only show 'true' is you had selected a boolean attribute.
. . . . . . .
Presumably the actor is moved by a button or key . . ? Let's imagine it's the right arrow key.
When right arrow key is down
-Timer: every 0 seconds,
--Change Attribute: game.Distance to game.Distance+1.
@Socks This almost works. But a problem still remains, holding down the right arrow will up game.Distance by 1 and just stop, continuous clicks are needed to add game.Distance up.
Are you using these rules ?
When right arrow key is down
-Timer: every 0 seconds,
--Change Attribute: game.Distance to game.Distance+1.
Could you upload a screenshot of your rules ?
. . . . . .
You didn't respond to the issue about 'displaying text doesn't seem to work. the text that pops up is "true" Did that issue resolve itself ?
@Socks i fixed the text display bug by changing the attribute to an integer , here are the rules http://gyazo.com/9fa48a4d95f84a12d2042b19bc381623
Ok, that makes sense.
Your change attribute behaviour has to go inside the timer.
@Socks , your awesome I would give you a cookie , but I'm too busy developing thanks for the help! Ill let you know when my app is on the app-store / play store seeing that you have helped me alot already!