For a hot air ballooning project I'm making, I need to use infinite 4-way scrolling, but it stops at the bottom, which has a grass base. I can try to do it myself, but I've never really gotten infinite scrolling to work very well for me, and that was only X-scrolling, plus the grass base might complicate things a bit. What would be the best way to do this? I know I will need at least four sprites for the sky and two sprites for the ground.
Offline
This should be in the "Help with Scripts" forum. Infinite scrolling requires a good amount of work and a knowledge of what a "mod" block does...although you can do infinite scrolling without it...it's much easier with. The script I usually use for a single sprite to do 4-way scrolling is:
go to x: (((scrollx) mod (960)) - (480)) y: (((scrolly) mod (720)) - (360)) stamp go to x: ((((scrollx) + (480)) mod (960)) - (480)) y: (((scrolly) mod (720)) - (360)) stamp go to x: ((((scrollx) + (480)) mod (960)) - (480)) y: ((((scrolly) + (360)) mod (720)) - (360)) stamp go to x: (((scrollx) mod (960)) - (480)) y: ((((scrolly) + (360)) mod (720)) - (360)) stampIf you have multiple costumes, that requires some additional math for the costume number you want.
Offline
i just started scratch, but have no idea how the scrollx variable works, can someone foreward me a tutorial or something?
Offline
tomthenoob wrote:
i just started scratch, but have no idea how the scrollx variable works, can someone foreward me a tutorial or something?
scrollx is just simply a variable...it's a number you can edit, but unlike positions, effects, sizes and such, it doesn't affect anything directly until you make it...such as setting the x position to a variable.
Offline
tomthenoob wrote:
i just started scratch, but have no idea how the scrollx variable works, can someone foreward me a tutorial or something?
Offline