scrolling background with timer so it changes

patrick6987patrick6987 Member Posts: 66
edited November -1 in Working with GS (Mac)
hi all i am wanting to have a scrolling background 960 wide 320 high that scrolls for say 20 seconds then it is replaced with a second srolling background for another 20 seconds then a third and fourth etc if it is possible
i would of thought there was something possible with the timer but at the moment i cant get my head around it without help, many thanks in advance

Comments

  • StormtrixStormtrix Member Posts: 256
    Hmmm.... well is your actual image 960x320?
    Different details across the image? or could you get away with just
    a 480x320 image that wraps the X horizontal scene where it's the same
    image for 20sec.
    create game.background attribute.
    Rule-- game.background = 1
    change image to background1.png
    change velocity to the left speed 20 or something (again if X is wrapped)
    Timer - after 20sec.
    change attribute - game.background To 2

    Rule --
    Rule-- game.background = 2
    change image to background2.png
    change velocity to the left speed 20 or something (again if X is wrapped)
    Timer - after 20sec.
    change attribute - game.background To 2

    ---- something like that...

    Otherwise i'd probably do this.

    If image is 960x320, i'd probably recommend breaking it in half. so you would have 2 images of 480x320..

    Then place them next to each other in scene size of like 1440x320..
    move camera to middle area.

    Make both images (same actor but 2 instances) meet together in middle
    and interpolate the images to 0 (rough estimate)
    time 20
    Rule if image 1 = self.position.x - 0
    change attribute self.position.x to right of camera x location
    and same with image 2..

    just quick example of ways to think about it.. gotta run.. wifi gone :)
  • patrick6987patrick6987 Member Posts: 66
    hi and many thanks for posting I will have a look and see if i can put it to fruition
Sign In or Register to comment.