Discuss Scratch

bloxxer
Scratcher
100+ posts

After reaching a certain "Level" (xpos) my character moves without any input.

Here is the project.
So, go to the project. When you press left, it all works you move 1 brick. But when you move to very left you get tp'ed to lvl 2 but you move without any keypress! I think the error is at prev_x that he has the prev_x from going to the end of the map. However, any ideas to fix it?


Hello if you can read this is a stupid mistake.
PiGames
Scratcher
5 posts

After reaching a certain "Level" (xpos) my character moves without any input.

Well, I checked it out, and I think the solution is to set prev_x to the x position of the cube when the broadcast cubey is received
.
drmcw
Scratcher
1000+ posts

After reaching a certain "Level" (xpos) my character moves without any input.

PiGames wrote:

Well, I checked it out, and I think the solution is to set prev_x to the x position of the cube when the broadcast cubey is received
.
Yes just about to say the same thing. Tried it and it does cure it, set prev_x to -232, after the go to.

Last edited by drmcw (June 26, 2013 19:28:27)


10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
bloxxer
Scratcher
100+ posts

After reaching a certain "Level" (xpos) my character moves without any input.

i tried it before didnt work


Hello if you can read this is a stupid mistake.
andre_rifaut
Scratcher
100+ posts

After reaching a certain "Level" (xpos) my character moves without any input.

I had a look.
Just show the x position of the sprite and you will understand what happen.
Then put also a say hello in your script for left arrow. In the loop just before change x by -2.

The explanation is that the CENTER (i.e. cross hair in the sprite editor) of the sprite cannot go far outside of the screen. (unlike 1.4).


bloxxer
Scratcher
100+ posts

After reaching a certain "Level" (xpos) my character moves without any input.

1. Sorry guys. Yes, you two first replies were right! I just didnt realize. THANKS!

2. Hey @andre_rifaut , 1. i didnt understtod wut u said o.O 2. thats way too complicated, just setting prev_x xpos is way easier.


Hello if you can read this is a stupid mistake.

Powered by DjangoBB