Help With Scrolling
id: 750328
category: Help with Scripts
posts: 34
fraaker456
loading
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
loading
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
fraaker456
loading
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
loading
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
GrayDevScratch
loading
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))
MineTurte
loading
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/
GrayDevScratch
loading
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))
GrayDevScratch
loading
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
loading
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
loading
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
loading
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
loading
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
fraaker456
loading
well i don like it and i hate bitmap
fraaker456
loading
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
loading
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.
fraaker456
loading
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
loading
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
fraaker456
loading
the blob sprite wont touch the level just floats
fraaker456
loading
ok i fixed it but i need to make it to where it dosent phase trough the ground
MineTurte
loading
It usually shouldn't… ok i fixed it but i need to make it to where it dosent phase trough the ground
fraaker456
loading
it does a lil
fraaker456
loading
.
fraaker456
loading
So can anyone help with this problem
Phase through ground
Phase through platforms
Phase through ground
Phase through platforms
fraaker456
loading
NEVER MIND I FIXED IT CRedit to the um guy who umm errrr made fixeed
MineTurte
loading
Me? NEVER MIND I FIXED IT CRedit to the um guy who umm errrr made fixeed
fraaker456
loading
But i am now making a goal flag still need help with scrool related thing but now making flag do fland things
MineTurte
loading
I can add a flag for you if you'd like. A win flag correct? Like you get to it and touch it and you either go to the next level or just win? But i am now making a goal flag still need help with scrool related thing but now making flag do fland things
Nt3_m
loading
steal code from griffpatch
fraaker456
loading
Yea i made one but it dosent stay in the same place you can do that thanks!I can add a flag for you if you'd like. A win flag correct? Like you get to it and touch it and you either go to the next level or just win? But i am now making a goal flag still need help with scrool related thing but now making flag do fland things
fraaker456
loading
i made a start menu
MineTurte
loading
Okay. Sorry I forgot about the flag lol. I'll do it now! i made a start menu
MineTurte
loading
fraaker456
loading
Thanks You Willl be in my credits Wait how do i make it chage depending on levels its only for level 2
fraaker456
loading
Nvm it work just ^
|
|