Parallax Movement Effect for sidescroller game
Hello! Making a game and i want to create some depth in the background.
I have 1 background for the game.
Infront of that background i have a "middle background" with trees and stuff.
And infront of that background i have the plane where the character is walking.
I want to make so whenever the characters._x is either raising or getting lower then the background assets (the middle background) will also move in the same direction but with a lower speed than the character.
Any kind soul out there that can figure out the code for that?
I'm using Actionscript 2.0
Designer, Programmer, Musician
I can't think too much right now..but maybe when you move you character towards a direction, you can set a variable like var direction to "right" or "lef" or whatever direction, and also the var speed. Then to your background, if(direction == "right") background._x+= speed - 10; (where 10 is the substraction of the character speed so the background runs with a slower speed). Maybe that works for you, see you by
Tags for this Thread
Click Here to Expand Forum to Full Width