Discuss Scratch

japan_blossom
Scratcher
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
japan_blossom
Scratcher
100+ posts

move horizontally

Need Help
deck26
Scratcher
1000+ posts

move horizontally

Why is that a problem? How are you moving? (change x by? glide? move n steps?)
japan_blossom
Scratcher
100+ posts

move horizontally

deck26 wrote:

Why is that a problem? How are you moving? (change x by? glide? move n steps?)
move 2 steps
japan_blossom
Scratcher
100+ posts

move horizontally

japan_blossom wrote:

deck26 wrote:

Why is that a problem? How are you moving? (change x by? glide? move n steps?)
move 2 steps
i dont know how to code it
deck26
Scratcher
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.
japan_blossom
Scratcher
100+ posts

move horizontally

deck26 wrote:

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.
Ok thanks for your help
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
Scratcher
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
asivi
Scratcher
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.
japan_blossom
Scratcher
100+ posts

move horizontally

asivi wrote:

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.
Thank For Ur Suggestion .
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
Scratcher
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
Scratcher
100+ posts

move horizontally

deck26 wrote:

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.
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 .
- God bless the u -
FuturePr0
Scratcher
100+ posts

move horizontally

japan_blossom wrote:

deck26 wrote:

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.
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 .
- God bless the u -
Couldn't you just use a glide for () secs to x () y() block?
nvm that won't work.

Last edited by FuturePr0 (Dec. 16, 2017 17:42:57)


BRUH
japan_blossom
Scratcher
100+ posts

move horizontally

FuturePr0 wrote:

japan_blossom wrote:

deck26 wrote:

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.
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 .
- God bless the u -
Couldn't you just use a glide for () secs to x () y() block?
nvm that won't work.
I tried that , but i have another sprite that does an action after touching this sprite
gliding makes the sprite “ un touchable ”
deck26
Scratcher
1000+ posts

move horizontally

japan_blossom wrote:

FuturePr0 wrote:

japan_blossom wrote:

deck26 wrote:

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.
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 .
- God bless the u -
Couldn't you just use a glide for () secs to x () y() block?
nvm that won't work.
I tried that , but i have another sprite that does an action after touching this sprite
gliding makes the sprite “ un touchable ”
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.
japan_blossom
Scratcher
100+ posts

move horizontally

deck26 wrote:

japan_blossom wrote:

FuturePr0 wrote:

japan_blossom wrote:

deck26 wrote:

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.
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 .
- God bless the u -
Couldn't you just use a glide for () secs to x () y() block?
nvm that won't work.
I tried that , but i have another sprite that does an action after touching this sprite
gliding makes the sprite “ un touchable ”
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.
Then its my coding

Powered by DjangoBB