Pages: 1
Hi All,
I have a sprite which glides along the y axis - when the space bar is pressed I have it so the gliding speed changes, at which point another sprite is told to got the first sprite (The second sprite is also hidden until the space is pressed)
The first sprite also has 2 costumes depending on the direction it is gliding.
This works fine except when the first sprite is between x -220 and x -150 (approx)
Sometimes when I press the space bar the costume of the first sprite changes when it shouldn't
Also the second sprite which should go to the first sprite doesn't - it goes to x 220 (approx)
The gliding of the first sprite is on a fixed y position of 22.
Just a tad frustrating
Cheers
Dj
Offline
Can you give us a link to your project? It's a lot easier to track down issues when we can see the scripts.
Offline
A link would indeed be helpful
djmartin67 wrote:
I have a sprite which glides along the y axis - when the space bar is pressed I have it so the gliding speed changes, at which point another sprite is told to got the first sprite (The second sprite is also hidden until the space is pressed)
Are you using the "glide" blocks? Because I tried this:
when green flag clicked go to x:(-160) y:(122) glide (10) secs to x:(-164) y:(-108) when [space v] key pressed glide (5) secs to x:(-164) y:(-108)[edit this]
Offline
Use the two blocks for glide.
glide 10 secs to x:-164 y:-108 glide 10 secs to x:-160 y:122Use a variable for control. If space key pressed, variable a set. If variable 1, set to 0. If variable 0, set to 1. If variable = 0, glide to one point. If variable = 1, glide to two point.
Offline
DanilaKritsin wrote:
Use the two blocks for glide.
glide (10) secs to x:(-164) y:(-108) glide (10) secs to x:(-160) y:(122)Use a variable for control. If space key pressed, variable a set. If variable 1, set to 0. If variable 0, set to 1. If variable = 0, glide to one point. If variable = 1, glide to two point.
scratchblocks fixed
Offline
Pages: 1