Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » move horizontally
- japan_blossom
-
100+ posts
move horizontally
I want a sprite to move horizontally so that x coordinates are limited between -225 and 117
while the y coordinates are 148
- deck26
-
1000+ posts
move horizontally
Why is that a problem? How are you moving? (change x by? glide? move n steps?)
- japan_blossom
-
100+ posts
move horizontally
move 2 steps Why is that a problem? How are you moving? (change x by? glide? move n steps?)
- japan_blossom
-
100+ posts
move horizontally
i dont know how to code itmove 2 steps Why is that a problem? How are you moving? (change x by? glide? move n steps?)
- deck26
-
1000+ posts
move horizontally
So set the position with y at the value you want and point in direction 90 or -90 so any move n steps is only changing x and keep checking the range.
Forgive me if I'm wrong but I think you're capable of working this stuff out with a bit of thought and are coming here without really trying things for yourself. You'll find it much more satisfying if you spend a little time on problems like this and manage to sort them for yourself.
Forgive me if I'm wrong but I think you're capable of working this stuff out with a bit of thought and are coming here without really trying things for yourself. You'll find it much more satisfying if you spend a little time on problems like this and manage to sort them for yourself.
- japan_blossom
-
100+ posts
move horizontally
Ok thanks for your help So set the position with y at the value you want and point in direction 90 or -90 so any move n steps is only changing x and keep checking the range.
Forgive me if I'm wrong but I think you're capable of working this stuff out with a bit of thought and are coming here without really trying things for yourself. You'll find it much more satisfying if you spend a little time on problems like this and manage to sort them for yourself.
Dont judge too quickly , I have been trying for half an hour , i searched the book i have, i tried mixing scripts , i even looked at one of my projects that i used a similar idea in , but it was with no use , so i asked in here .
- asivi
-
1000+ posts
move horizontally
Ok, if yposition=148
change x by some amount
If xposition is >117 then set xposition to 117
if xposition is <-225 then set xposition to -225
change x by some amount
If xposition is >117 then set xposition to 117
if xposition is <-225 then set xposition to -225
- asivi
-
1000+ posts
move horizontally
I do not remember if i suggested this before, anyway
https://scratch.mit.edu/tips go there and practice with projects for starters.
You consider stop flooding the forum with simple questions. Thanks.
https://scratch.mit.edu/tips go there and practice with projects for starters.
You consider stop flooding the forum with simple questions. Thanks.
- japan_blossom
-
100+ posts
move horizontally
Thank For Ur Suggestion . I do not remember if i suggested this before, anyway
https://scratch.mit.edu/tips go there and practice with projects for starters.
You consider stop flooding the forum with simple questions. Thanks.
Question U Find Easy Can BE Difficult For Others
Sorry for being harsh
Last edited by japan_blossom (Dec. 16, 2017 13:41:27)
- deck26
-
1000+ posts
move horizontally
I think @asivi has a valid point though - spending some time on the starter projects would probably be a good way for you to learn more of the basics. Learning in the piecemeal way you will by asking questions here is likely to much slower.
- japan_blossom
-
100+ posts
move horizontally
I understand that , but I have to bring my project to school by tomorrow and I just asked because i know i can get quick help from u , scratchers . I think @asivi has a valid point though - spending some time on the starter projects would probably be a good way for you to learn more of the basics. Learning in the piecemeal way you will by asking questions here is likely to much slower.
- God bless the u -
- FuturePr0
-
100+ posts
move horizontally
Couldn't you just use a glide for () secs to x () y() block?I understand that , but I have to bring my project to school by tomorrow and I just asked because i know i can get quick help from u , scratchers . I think @asivi has a valid point though - spending some time on the starter projects would probably be a good way for you to learn more of the basics. Learning in the piecemeal way you will by asking questions here is likely to much slower.
- God bless the u -
nvm that won't work.
Last edited by FuturePr0 (Dec. 16, 2017 17:42:57)
BRUH
- japan_blossom
-
100+ posts
move horizontally
I tried that , but i have another sprite that does an action after touching this spriteCouldn't you just use a glide for () secs to x () y() block?I understand that , but I have to bring my project to school by tomorrow and I just asked because i know i can get quick help from u , scratchers . I think @asivi has a valid point though - spending some time on the starter projects would probably be a good way for you to learn more of the basics. Learning in the piecemeal way you will by asking questions here is likely to much slower.
- God bless the u -
nvm that won't work.
gliding makes the sprite “ un touchable ”
- deck26
-
1000+ posts
move horizontally
No it doesn't. A sprite that is gliding can detect the touch in a separate script (but you can't interrupt the glide) or the second sprite can detect touching the one that is gliding.I tried that , but i have another sprite that does an action after touching this spriteCouldn't you just use a glide for () secs to x () y() block?I understand that , but I have to bring my project to school by tomorrow and I just asked because i know i can get quick help from u , scratchers . I think @asivi has a valid point though - spending some time on the starter projects would probably be a good way for you to learn more of the basics. Learning in the piecemeal way you will by asking questions here is likely to much slower.
- God bless the u -
nvm that won't work.
gliding makes the sprite “ un touchable ”
- japan_blossom
-
100+ posts
move horizontally
Then its my codingNo it doesn't. A sprite that is gliding can detect the touch in a separate script (but you can't interrupt the glide) or the second sprite can detect touching the one that is gliding.I tried that , but i have another sprite that does an action after touching this spriteCouldn't you just use a glide for () secs to x () y() block?I understand that , but I have to bring my project to school by tomorrow and I just asked because i know i can get quick help from u , scratchers . I think @asivi has a valid point though - spending some time on the starter projects would probably be a good way for you to learn more of the basics. Learning in the piecemeal way you will by asking questions here is likely to much slower.
- God bless the u -
nvm that won't work.
gliding makes the sprite “ un touchable ”
![](http://cdn.scratch.mit.edu/scratchr2/static/__dd00aa92a78a279a4faed9a4a61d15fa__/djangobb_forum/img/smilies/big_smile.png)
- Discussion Forums
- » Help with Scripts
-
» move horizontally