Infinite runner, i could use some help
njvdberge@gmail.com
Indie Game DeveloperBreda, the NetherlandsMember Posts: 22
Hey there,
i am creating a infinite runner for the iphone, or at least i am trying to create one.
I can jump with my character (chacter stays on 1 place), i got random scrolling platforms and i got a distance meter. It works all perfect.
but the only problems now is, i want to make my character sitting on a platform before you start. and when you actually press screen the game starts running. i have tried to create a platform like that but now when i start the game every time i press jump, all platforms slow down for some reason and doesnt like to go off screen anymore. (this happens with the starting platform but also with the random platforms)
I am curious if somebody want to help me with my problem.
Comments
Do you mean have the game stationary, and then when you press 'play' the game begins and the platforms start moving etc? If so heres something you can try:
Make a game attribute (boolean) called GameStart. set to false.
Drag all you behaviours in all your actors that you don't want to move into a rule saying:
When game.GameStart is true - (and then all the behaviours)
Then make an actor called 'Start'.
In this actor put 'when touch is pressed', change game.GameStart to true.
Then in which ever rule you use to determine game over, put Change attribute GameStart to false.
Something like that anyway hope this helps .
Hey thnx man! i did exactly what you said and it work perfectly right now!
you have helped me alot! thnx!
but now im getting trouble with my score count, when you are dead it will pause the game but not my score. i have tried with pause game attribute and game over boolean but it did not work.
do you know how to pause it and when you touch again you restart the scene?
what you could do is:
create attribute deadsignal(iboolean)=true
if attribute deadsignal = true
(rule for counting points in the do part of the rule)
if collision with (what ever actor, or put whatever event you want to make the score stop)
change attribute deadsignal = false
Oke thnx, i am trying now but i cant find a behavior for stopping the score count.
@njvdberge@gmail.com there is no behavior for score count. So we will have to make out own.
create attribute score count=0
If(whatever condition), deadsignal.game = true
Do: Change attribute scorecount.game = scorecount.game+1
If: collision
Do change deadsignal.game = false
This is how it works.
when something is happening and the attribute is true
only then will it count
but when it collides
then it changes the attribute to false so then it wont count anymore