Hi, my previous post asked how to do scrolling, and I must say it was very usefull. However being the pushing person I am I wanted better. So I posting today asking if someone could explain to me how to do infinite scrolling, by that I mean you never see blank it just goes back to your first background.
All help apreciated,
Messd002.
Offline
Just use if statements that change the values of the scroll variables. You should try experimenting a bit.
Basically what I think you want is so that when the scroll variable reaches a certain value it is reset.
Offline
Try something like
if scrollX>1000
set scrollX to 0
Offline
OR use the mod block
i.e if each sprite is 460 wide and you are using 3 of them - instead of reffering to ScrollX in Archimage's examples - try using somthing like ScrollX mod 1380 (1380= 460*3).
I've not tried it out but it could give useful results :-)
regards
Simon
Offline
if you wanted something to keep record of... how many metres you have gone for example, you make a variable that keeps record of how many resets there have been, and then make another variable for distance travelled, and set it to scroll x + 1000 (scroll limit)*resets.
Offline
archmage wrote:
Try something like
if scrollX>1000
set scrollX to 0
No Archmage, it's <1000. You use negatives, remember
Offline
Bluestribute wrote:
archmage wrote:
Try something like
if scrollX>1000
set scrollX to 0No Archmage, it's <1000. You use negatives, remember
Hey, what I said still works. If you go left the number increases right? So when it gets over 1000 it goes back to 0. If you wanted it to reset when you move to the right then you would put scrollX<-1000.
Offline
archmage wrote:
Bluestribute wrote:
archmage wrote:
Try something like
if scrollX>1000
set scrollX to 0No Archmage, it's <1000. You use negatives, remember
Hey, what I said still works. If you go left the number increases right? So when it gets over 1000 it goes back to 0. If you wanted it to reset when you move to the right then you would put scrollX<-1000.
Yes, I know you were still right> I just never use left scrolling. I just make it a wall kinda
Offline
http://scratch.mit.edu/projects/CFCRubiks/174476 You can use those. Not very complicated ,and now I'm adding changing backgrounds. P.S, If you download it and dont get the 1000 part, I just needed to use a big number to get a deciaml
Offline
Try This!!!!!
Try some of my projects. I make some simple, understandable and easy scrolling and loop scrolling tutorials. If you want loop scrolling I have 1 tutorial only demonstrating the X co-ordinate but I have a project, (called 360 Degree Panorama) which displays loop scrolling on both the X and the Y co-ordinate.
TRO95
Last edited by tro95 (2008-07-08 12:58:47)
Offline