• Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!

Legacy GM Background Sprite Placement *SOLVED*


OK, the issue is that I wanted to move a non-repeating background sprite relative to the player, but to also place the sprite a bit ahead of the player when they enter the room. This is the parallax code:
background_x[1] = view_xview[0]*0.6;
By doing this, I end up with a situation where the sprite is always placed at the far left of the room, where the player enters, rather than slightly farther ahead where I have placed it in the room editor. My question is, can I apply the parallax code 'and' also have the background sprite placed ahead of the player when they enter the room?
Thank you.


Try this maybe

background_x[1] = view_xview[0]*0.6 + offset;
set the offset to the position you gave the background in the room


You can either put the offset at the end like that, or encapsulate the offset and the view between parentheses. That will result in a different positioning, so you would have to modify it a little.