need to tap right first to move the player.

Hi. I am currently creating this app game. but there seems few problems. Just like the title said but there are also a second problem. 

First problem :To move the player I need to tap right first, then I can tap right and left. ifi tap left first it will not budge. and if i tap right then tap again at right then it move to the right. 

Second problem : my game does save the results of the scores. but when i lost and restart. the collision not function.

i am very sorry about the share. This is the link for the whole folder. I use google drive.

 

https://drive.google.com/file/d/0Bwg59Oi2EqFIcWhZWERFdUNxckk/view?usp=sharing

 

i really hope this can help you to understand my problem and help solving my problems. 

Thanks in advance.

ignore the attach files. Just click the link. 

Instead of uploading your project in parts, why not upload it to Google Drive, Dropbox or some other cloud storage and just post the URL. It will be easier for people wanting to help.

Rob

i am very sorry about the share. This is the link for the whole folder. I use google drive. I hope you can help me. 

 

https://drive.google.com/file/d/0Bwg59Oi2EqFIcWhZWERFdUNxckk/view?usp=sharing

The problem is here:

local laneID = 1

and here

print("Tapped Left Side") if laneID \> 1 then     laneID = laneID - 1;

When you start, the chicken is in lane2, but you initialize laneID to 1.  Then in your test, if laneID > 1 then laneID isn’t greater than 1 so the test fails and the function returns. Setting laneID to 2 solved the problem.

Rob

WOW thanks why I didn’t see that ! thanks a lot :slight_smile:

Do you got the same problem like my second problem?

Instead of uploading your project in parts, why not upload it to Google Drive, Dropbox or some other cloud storage and just post the URL. It will be easier for people wanting to help.

Rob

i am very sorry about the share. This is the link for the whole folder. I use google drive. I hope you can help me. 

 

https://drive.google.com/file/d/0Bwg59Oi2EqFIcWhZWERFdUNxckk/view?usp=sharing

The problem is here:

local laneID = 1

and here

print("Tapped Left Side") if laneID \> 1 then     laneID = laneID - 1;

When you start, the chicken is in lane2, but you initialize laneID to 1.  Then in your test, if laneID > 1 then laneID isn’t greater than 1 so the test fails and the function returns. Setting laneID to 2 solved the problem.

Rob

WOW thanks why I didn’t see that ! thanks a lot :slight_smile:

Do you got the same problem like my second problem?