Discuss Scratch

aakq2_100
Scratcher
9 posts

I need help with a scrolling platformer

So, I wanted to make a scrolling platformer so I used a tutorial https://www.youtube.com/watch?v=n5hrGGl9u78. I put the scrolling code in the ground sprite but the ground went to the top and it wont work properly.


whenclickedforevergotox:Scrollxy:Scrollyisthisthecorrectcodetouse?
Clown-Peirce-16
Scratcher
1 post

I need help with a scrolling platformer

this is not the correct coding to use go into Ädvanced Tutorials and go to scrolling to move there it will shw you good luck!
aakq2_100
Scratcher
9 posts

I need help with a scrolling platformer

Clown-Peirce-16 wrote:

this is not the correct coding to use go into Ädvanced Tutorials and go to scrolling to move there it will shw you good luck!

Can you give me a link to advanced Tutorials.
Coder_68815
Scratcher
7 posts

I need help with a scrolling platformer

you put - scroll y in it
aakq2_100
Scratcher
9 posts

I need help with a scrolling platformer

Coder_68815 wrote:

you put - scroll y in it

What do you mean? can you show me in code blocks.
ashernfl
Scratcher
1 post

I need help with a scrolling platformer

well that sucks
BenTheGoatFr
Scratcher
1 post

I need help with a scrolling platformer

whenclicked
forever
go to x: (scroll x) y: (scroll y)
end

Last edited by BenTheGoatFr (Feb. 28, 2025 19:34:07)

aakq2_100
Scratcher
9 posts

I need help with a scrolling platformer

here is the code I put in the payer for the scrolling. Could this have something to do with the error? All the movement was working perfectly fine until I added these blocks and added the blocks in the ground which I have posted above.





change scroll xbyxposition*-1change scroll ybyyposition*-1gotox:0y:0error?

Last edited by aakq2_100 (Feb. 28, 2025 20:04:06)

ThreeLived
Scratcher
100+ posts

I need help with a scrolling platformer

if you change its own position by its own position it's going to exponentially increase really fast (maybe). Your supposed to do go to 0- scroll x and 0- scroll y.

Last edited by ThreeLived (March 1, 2025 15:45:31)

aakq2_100
Scratcher
9 posts

I need help with a scrolling platformer

ThreeLived wrote:

if you change its own position by its own position it's going to exponentially increase really fast (maybe). Your supposed to do go to 0- scroll x and 0- scroll y.


I got the problem solved. So, I watched another tutorial which had some of the same code but I didn't want to lose my progress so I just added the scrolling part but that didn't work either. So, I just played around with the blocks. here is what I put for the player's movement code:
set Scroll Xtoxposition-X

The code for the ground:
whenclickedforevergotox:x-Scrollxy:y-Scrolly

The variables for the player are:
x - for this Sprite only
y - for the Sprite only
Scroll x - for all Sprites
Scroll y - for all Sprites


The variables for the ground are:
x - for this Sprite only
y - for the Sprite only

Last edited by aakq2_100 (March 2, 2025 11:50:05)

aakq2_100
Scratcher
9 posts

I need help with a scrolling platformer

I need help with the levels. when I make clones and do next costume, I cant go that far.
here is the link
https://scratch.mit.edu/projects/1140276407/

Last edited by aakq2_100 (March 1, 2025 21:06:46)

Blu_Cream
Scratcher
13 posts

I need help with a scrolling platformer

I can help!
aakq2_100
Scratcher
9 posts

I need help with a scrolling platformer

Blu_Cream wrote:

I can help!

thanks could you give me the code for the levels. I have the scrolling code I just need the code that makes it so I have more than one level so that it is not so short.
LeonN2015
Scratcher
1 post

I need help with a scrolling platformer

I've done this before but I don't remember

Powered by DjangoBB