Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to move sprites on "platforms"
- GotAnItchTo
-
5 posts
how to move sprites on "platforms"
so I'll give a bunch of examples, because I think that will paint the picture much better than I can articulate it in words:
Pixel Escape 2 by caleb61802 (https://scratch.mit.edu/projects/249181557/)
Platform by AntiGames (https://scratch.mit.edu/projects/11352408/)
Trapped (Platform) by ncats (https://scratch.mit.edu/projects/71392480/)
One Platform by merodic (https://scratch.mit.edu/projects/95497839/)
So I am pulling my hair out trying to do I guess 2 or 3 things:
have I guess “platform” is the word and a sprite that can walk/run/move on the platform by pressing the left and right arrow keys. also allow that moving sprite to jump up and after reaching a peak, fall back down. also allowing the sprite to jump up and down, but also combine arrow key presses so that you can jump up and then move fluidly left and and right by combing presses on the up arrow key with pressing the left or right arrow key
I've thought about using backdrops as the platforms, I've tried using separate sprites as the platforms, and costumes of backdrops and costumes of sprites
I think the hardest part is I guess the interaction of the moving sprite left, right, and jumping up and down, and interacting with the platform, also multi layered platforms, so that a sprite can drop to lower platforms if it “moves off” of one to one that is at a lower level (or at a higher level, if the moving sprite jumps around).
Perhaps this is hardest because the math/arithmetic/logic is confusing and also I've noticed in “looking inside” that I haven't been able to reverse engineer the math/logic of this. I think it is quite technical (for me) and also I think the coders make up a lot of their own blocks, going beyond the out of the box scratch functions.
All of the listed examples above, essentially share these features that I am trying to understand and code myself.
Thanks
if you can help!!
Pixel Escape 2 by caleb61802 (https://scratch.mit.edu/projects/249181557/)
Platform by AntiGames (https://scratch.mit.edu/projects/11352408/)
Trapped (Platform) by ncats (https://scratch.mit.edu/projects/71392480/)
One Platform by merodic (https://scratch.mit.edu/projects/95497839/)
So I am pulling my hair out trying to do I guess 2 or 3 things:
have I guess “platform” is the word and a sprite that can walk/run/move on the platform by pressing the left and right arrow keys. also allow that moving sprite to jump up and after reaching a peak, fall back down. also allowing the sprite to jump up and down, but also combine arrow key presses so that you can jump up and then move fluidly left and and right by combing presses on the up arrow key with pressing the left or right arrow key
I've thought about using backdrops as the platforms, I've tried using separate sprites as the platforms, and costumes of backdrops and costumes of sprites
I think the hardest part is I guess the interaction of the moving sprite left, right, and jumping up and down, and interacting with the platform, also multi layered platforms, so that a sprite can drop to lower platforms if it “moves off” of one to one that is at a lower level (or at a higher level, if the moving sprite jumps around).
Perhaps this is hardest because the math/arithmetic/logic is confusing and also I've noticed in “looking inside” that I haven't been able to reverse engineer the math/logic of this. I think it is quite technical (for me) and also I think the coders make up a lot of their own blocks, going beyond the out of the box scratch functions.
All of the listed examples above, essentially share these features that I am trying to understand and code myself.
Thanks

- mstone326
-
1000+ posts
how to move sprites on "platforms"
Take a good read and take your time going through this tutorial from @Griffpatch_tutor. It will cover everything you need. Just go slowly and try to understand it all before going to the next slide. Good luck on your project.
https://scratch.mit.edu/projects/67727504/
https://scratch.mit.edu/projects/67727504/
- GotAnItchTo
-
5 posts
how to move sprites on "platforms"
Thanks so much @mstone326!!!
Will give it a go!

Will give it a go!

- GotAnItchTo
-
5 posts
how to move sprites on "platforms"
So, I'm following along on the tutorial.
I got stuck with the following situation.
When I tried to make my sprite move left or right, by pressing either the arrow keys or ‘a’ and ‘d’, I wasn't able to move like the tutorial suggested I should.
The gravity thing on the previous slides worked fabulously. I ain't thought of that idea. But moving left and right, wasn't working as the tutorial suggested it should. I got stuck on #3 Walking
I tried to upload the pictures here, not sure if the links work or the image is as clear resolution as it was over here.

Your text to link here…
Your text to link here…
Thanks if anyone can suggest help!!!
I got stuck with the following situation.
When I tried to make my sprite move left or right, by pressing either the arrow keys or ‘a’ and ‘d’, I wasn't able to move like the tutorial suggested I should.
The gravity thing on the previous slides worked fabulously. I ain't thought of that idea. But moving left and right, wasn't working as the tutorial suggested it should. I got stuck on #3 Walking
I tried to upload the pictures here, not sure if the links work or the image is as clear resolution as it was over here.
Your text to link here…
Your text to link here…
Thanks if anyone can suggest help!!!
Last edited by GotAnItchTo (Oct. 13, 2018 22:49:46)
- gamemakertgr
-
94 posts
how to move sprites on "platforms"
So, I'm following along on the tutorial.
I got stuck with the following situation.
When I tried to make my sprite move left or right, by pressing either the arrow keys or ‘a’ and ‘d’, I wasn't able to move like the tutorial suggested I should.
The gravity thing on the previous slides worked fabulously. I ain't thought of that idea. But moving left and right, wasn't working as the tutorial suggested it should. I got stuck on #3 Walking
I tried to upload the pictures here, not sure if the links work or the image is as clear resolution as it was over here.
Your text to link here…
Your text to link here…
Thanks if anyone can suggest help!!!
I might be able to help.
first, I like to make my x and y coordinates into variables. it helps me sorta
then I would do this script if you need help with the moving
this should work, but im not sure. I haven't used this script in a while
- deck26
-
1000+ posts
how to move sprites on "platforms"
Sharing what you have is the best way to get help. The scripts from the tutorial should generally be OK so you may have made an error.
- GotAnItchTo
-
5 posts
how to move sprites on "platforms"
thanks @gamemakertgr, but I don't think that was on point with what I was struggling with.
To your point @desk26, here is my shared project:
Also I am following from the initial reply to my post by @mstone326, and the tutorial he suggested.
Thanks if anyone can help!
To your point @desk26, here is my shared project:
Also I am following from the initial reply to my post by @mstone326, and the tutorial he suggested.
Thanks if anyone can help!
- GotAnItchTo
-
5 posts
how to move sprites on "platforms"
Well I kind of stumbled on a working solution. Not quite sure what small bug I fixed, but it is definitely working now.
Below is a screenshot of the updates script. Perhaps it is updated and saved in the project url as well:

image url
Thanks for your help anyways guys!
Below is a screenshot of the updates script. Perhaps it is updated and saved in the project url as well:

image url
Thanks for your help anyways guys!
- Discussion Forums
- » Help with Scripts
-
» how to move sprites on "platforms"