• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Scroll across view not room

H

humblefly

Guest
How would I go about scrolling a background across the range of the view but not across the entire room?

What I mean is, in the room editor I can set a background (clouds) to scroll left to right, however this scrolls across the entire length of the room. I want the clouds scrolling to be confined to the range of the view only.

Is there a way to do this? I can't seem to think of one.
 
H

humblefly

Guest
Some further information.

My room has a width of 1920, the view has a width 853.
I'm controlling my backgrounds with a parallax type system

Code:
background_x[0] = view_xview; // The sky background
background_hspeed[1] = -.1;
background_x[2] = view_xview * .06;
background[1] is the cloud layer I'm trying to scroll across the view. I was originally trying background_x[1] = view_xview along with it, until I realized that it was basically conflicting with each other.
 
Top