sonicfan12p wrote:
The x y velocity variables control movement, makes it look smooth, and can be used to generate gravity or momentum. But background changing doesn't really have much to do with those variables. For back grounds, make a field, such as this one,
when gf clicked forever if < ([background # v] of [Stage v]) = [10] > if <<<< (x position) > [240]> and < (y position)> [100]>> and < (y position) < [160]>> switch to background [random background v] else if <<<< (x position) > [240]> and < (y position)> [-160]>> and < (y position) < [-100]>> switch to background [random background 2 v] end end endThis will give you a high route, and a low route.
Oh and, Is this for the stage, or a sprite, becaus eI'm using a sprite.
Offline
gooeygoo wrote:
sonicfan12p wrote:
The x y velocity variables control movement, makes it look smooth, and can be used to generate gravity or momentum. But background changing doesn't really have much to do with those variables. For back grounds, make a field, such as this one,
when gf clicked forever if < ([costume # v] of [Background Sprite v]) = [10] > if <<<< (x position) > [240]> and < (y position)> [100]>> and < (y position) < [160]>> switch to costume [random background v] else if <<<< (x position) > [240]> and < (y position)> [-160]>> and < (y position) < [-100]>> switch to costume [random background 2 v] end end endThis will give you a high route, and a low route.Oh and, Is this for the stage, or a sprite, because I'm using a sprite.
Well, it was for the stage. But The one above is now for a sprite.
Last edited by sonicfan12p (2012-08-21 17:38:16)
Offline
gooeygoo wrote:
Ok, I think I have the hang of it, but I need help, Theres some glitch that when you move to background 2, you sometimes get stuck in the ground
You have to set the right X and Y position when you go to a new location
Offline
gooeygoo wrote:
Ah, ok. That helps. but how will it work?
What it does, is when you get to a certain part of the level, in this case, costume number 10, it checks to see if you are at the far right edge of the screen. If you are, it uses the y position to determine if you are taking the upper route, or lower route, the switches to the appropriate costume.
Offline