A simple code to make your backgrounds use auto-scroll. Includes options to customize the direction, speed and an option to disable the scroll when the player dies. Note that for this to work properly you need to set H-Scroll and V-Scroll to None in the level via Lunar Magic.
That's in fact it. It's also a good call to include an ORA $13D4 before the branch to also check for the game being paused, or else the position will keep increasing and be offset when unpausing. I did those changes here and it works perfectly.
Thanks for the feedback Koopster. That's indeed a good idea, I wasn't aware that such a RAM existed (I'm still newbie about asm stuff) but I'm going to test it a bit to see how it works. I'm assuming it's just changing the check from $71 to $9D (but instead checking when it's #$01 it's non-zero).
I'm trying to add this with UberASM/Asar but I just keep getting an error that "define "addr" wasn't found". What am I doing wrong?
First of all, don't insert this with Asar, it's not the case for (just for your information, UberASM Tool and Asar are different things). Use only UberASM Tool to insert this, it should work fine. If still not, make a post in a help forum giving more details about your issue.
Will this work with levels that have the layer 2 interaction enabled?
No, this is just for backgrounds. Using it in levels with Layer 2 FG will result in garbage looping infinitely.
Originally posted by zacmario
Shiny do you think you could do this with layer 3?
Well, you kinda doesn't need that since Lunar Magic already give you options to autoscroll the Layer 3, unless you want the diagonal ones, of course. Haven't tested it carefully, but changing '$1466|!addr' and '$1468|!addr' to '$0022|!dp' and '$0024|!dp' will do the trick. The problem, either way, is dealing with the status bar, which is the reason why I didn't add this as a customizable option to begin with (unless you use a patch like Nuke Status Bar, which actually removes the status bar from the Layer 3).