Discuss Scratch
- fraaker456
- Scratcher
41 posts
Help With Scrolling
Hello i am making a platformer and i wanted to make it scroll and zoom in to ap-pear bigger (zoom is easy just make them bigger with some script)
but tutorials make script on levels and movement whitch i have already done can anyone help! https://scratch.mit.edu/projects/963905027
but tutorials make script on levels and movement whitch i have already done can anyone help! https://scratch.mit.edu/projects/963905027
- MineTurte
- Scratcher
500+ posts
Help With Scrolling
What exactly is your problem? You said you followed tutorials on how to do it but don't say what exactly is wrong with the tutorials or what you did (other than the scrolling itself). Hello i am making a platformer and i wanted to make it scroll and zoom in to ap-pear bigger (zoom is easy just make them bigger with some script)
but tutorials make script on levels and movement whitch i have already done can anyone help! https://scratch.mit.edu/projects/963905027
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- fraaker456
- Scratcher
41 posts
Help With Scrolling
I am trying to do scrolling on my platformer without changing my current movement code and my curent level sprite.
The videos make movement code with blocks like (CameraX,CameraY) but i just want to add a script to my current code and not replace it all.
https://scratch.mit.edu/projects/963905027
The videos make movement code with blocks like (CameraX,CameraY) but i just want to add a script to my current code and not replace it all.
https://scratch.mit.edu/projects/963905027
- MineTurte
- Scratcher
500+ posts
Help With Scrolling
Okay, i'll see what I can do. I am trying to do scrolling on my platformer without changing my current movement code and my curent level sprite.
The videos make movement code with blocks like (CameraX,CameraY) but i just want to add a script to my current code and not replace it all.
https://scratch.mit.edu/projects/963905027
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- GrayDevScratch
- Scratcher
16 posts
Help With Scrolling
If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:
when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
end
go to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
Last edited by GrayDevScratch (March 26, 2024 17:23:12)
- MineTurte
- Scratcher
500+ posts
Help With Scrolling
That's not what he wanted. This is what he wanted: If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
endgo to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
https://scratch.mit.edu/projects/990183048/
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- GrayDevScratch
- Scratcher
16 posts
Help With Scrolling
I forgot to mention make sure to add the go to x - scrollX and y - scrollY to the background too. also, you can make the camera smoother with some methods, and its reasonably easy to implement. but you will need to change all the regular x and y to variable versions, that way you can actually scroll. im pretty sure this is mandatory for scrolling. If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
endgo to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
Last edited by GrayDevScratch (March 27, 2024 02:04:03)
- GrayDevScratch
- Scratcher
16 posts
Help With Scrolling
oh wait i didnt see that till now, but i still think it would be the best to just use the system i suggested for ease of use later on.That's not what he wanted. This is what he wanted: If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
endgo to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
https://scratch.mit.edu/projects/990183048/
- MrKingofScratch
- Scratcher
100+ posts
Help With Scrolling
for the zoom just multiply all movement and sizes by a zoom variable
for example make the position blocks
and the size would be
setting the zoom variable to 1 would make it normal size, and bigger numbers would zoom in, with smaller numbers zooming out.
I haven't done a project with zoom in a while and i didn't dig through my old code so correct me if there's any mistakes
for example make the position blocks
go to x: ((positionx) * (zoom)) y: ((positiony) * (zoom))
and the size would be
set size to ((size) * (zoom)) %
setting the zoom variable to 1 would make it normal size, and bigger numbers would zoom in, with smaller numbers zooming out.
I haven't done a project with zoom in a while and i didn't dig through my old code so correct me if there's any mistakes
- fraaker456
- Scratcher
41 posts
Help With Scrolling
That's not what he wanted. This is what he wanted: If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
endgo to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
https://scratch.mit.edu/projects/990183048/
i did not want this its just the level moves but not the player
- fraaker456
- Scratcher
41 posts
Help With Scrolling
oh wait i didnt see that till now, but i still think it would be the best to just use the system i suggested for ease of use later on.That's not what he wanted. This is what he wanted: If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
endgo to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
https://scratch.mit.edu/projects/990183048/
It dosent work are you sure it works cus i didnt work for me when i put
go to x: ((X) - (CameraX)) y: ((Y) - (CameraY))In a forever block i didnt work
- MineTurte
- Scratcher
500+ posts
Help With Scrolling
That's what scrolling is??That's not what he wanted. This is what he wanted: If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
endgo to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
https://scratch.mit.edu/projects/990183048/
i did not want this its just the level moves but not the player
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- fraaker456
- Scratcher
41 posts
Help With Scrolling
What u did worked but
What u did worked but it was a bitmap and it had infanite level witch i did not wantThat's what scrolling is??That's not what he wanted. This is what he wanted: If you want scrolling, make a separate script that just sets a variable for camera X to player X and another variable for camera Y to player Y, and then any time to make a go to X and Y block make sure its X - camera X and Y - camera Y. Basically just this:when green flag clicked
forever
set [CameraX v] to (X)
set [CameraY v] to (Y)
endgo to x: ((X) - (CameraX)) y: ((Y) - (CameraY))
https://scratch.mit.edu/projects/990183048/
i did not want this its just the level moves but not the player
- MineTurte
- Scratcher
500+ posts
Help With Scrolling
Well you can undo the bitmap? Just remake the map lol well i don like it and i hate bitmap
Edit: It's not infinite? You asked for scrolling I gave you scrolling lol.
Last edited by MineTurte (March 27, 2024 13:50:55)
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- fraaker456
- Scratcher
41 posts
Help With Scrolling
So i put it in my game but i need a litle help
There are many bugs with my animation and the scripts arent working
There are many bugs with my animation and the scripts arent working
- MineTurte
- Scratcher
500+ posts
Help With Scrolling
Yes I know the bugs with the animation but I was originally thinking you could fix it… Also what scripts in particular? So i put it in my game but i need a litle help
There are many bugs with my animation and the scripts arent working
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- fraaker456
- Scratcher
41 posts
Help With Scrolling
ok i fixed it but i need to make it to where it dosent phase trough the ground
- MineTurte
- Scratcher
500+ posts
Help With Scrolling
It usually shouldn't… ok i fixed it but i need to make it to where it dosent phase trough the ground
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context