Language…
13 users online:  Ahrion, crocodileman94,  Fernap, Foxy_9000_, Gamet2004, hoangng,  MarkAlarm, monkey03297, pnaha, Scags, sinseiga, Sweetdude, Tsquare07 - Guests: 256 - Bots: 270
Users: 64,795 (2,376 active)
Latest user: mathew

manipulating the layer 2

Well, the title says all, how can I make the layer 2 move? Like carol :D
To make layer 2 move, Go into Special Commands and Genarators then go near the bottom. There are a whole bunch of Layer 2 moving things. Select one and place it at the top of the level, then test it. Keep messing around until you found one you like.
Ok, I think I created this topic in the wrong area .. I need a code that handles the layer 2 as well as Carol does. I'm sure that the manipulations that carol is in layer 2 are not the same as SMW. Carol uses ASM. I was wondering THIS ASM code, you know? Sorry for the mistakes in grammar .. I used google translator to translate


Trust me, Google Translate is not what you want to use...

Also, we don't know what sort of Layer 2 manipulation you want to use. Carol use Layer 2 a ton, so what exactly do you want?

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
I need the code that "moves" the layer 2, the X and Y speed I can change. I have tried some RAMs but they don't work

$7E:001E 2 bytes Hardware mirror Layer 2 X position. Mirror of $210F.
$7E:0020 2 bytes Hardware mirror Layer 2 Y position. Mirror of $2110.

(I don't try these mirror RAMs)

$7E:1466 2 bytes Misc. Layer 2 X position(level)

I use this code for move the layer 2

INC $SomeLayer2Ram

Is this correct? If not, what's the code?

Once again, sorry by the grammar errors, I haven't used google translator but I'm brazilian...

What level uses Layer 2 in this way?
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
Yes, you have the right idea, you do want to manipulate those RAM addresses, although, there are a couple of snags:

-You have to be in 16-bit mode in order to properly manipulate those addresses.
-Incrementing the Y-position for anything will cause it to, counter-intuitively, go down.

So here would be some valid code to make layer 2 move up and to the right each frame:

Code
REP #$20
INC $1E
DEC $20
SEP #$20


Also, there is no value for the 'speed' of layer 2. You could use a sprite to do that, but that's rather complicated for Basic SMW hacking.
Now with extra girl and extra hacker
WOW, thanks!! But can I use this code with levelASM from ersanio?
Sure, you can use it from pretty much anywhere as long as the direct page hasn't been changed, but nobody ever does that, ever.
Now with extra girl and extra hacker
Ok, technically it works, but the layer 2 moves ONE PIXEL!!
Uh... yeah, it'll only move one pixel per frame...

If you want it to do more than that, you'll want to do this:

Code
REP #$20
LDA $1E
CLC
ADC #$0005
STA $1E
LDA $20
SEC
SBC #$0005
STA $20
SEP #$20


This, when run every frame, will move layer 2 five pixels up and five pixels to the right each frame.
Now with extra girl and extra hacker
Ok, it works but it doesn't run every frame! Only when level loads! I'm puting this code on level105, main!
Are you sure you put it in main? All your symptoms point straight at the fact that you stuck it in init instead. Could you re-check your files just in case?
Now with extra girl and extra hacker
Yes, I'm sure!! Here is a screenshoot:



Did I forget anything?
Um... wow. I'm not sure what's going on...

Maybe you could try changing $1E with $1466 and $20 with $1468? If that doesn't work, then I'm totally stumped...
Now with extra girl and extra hacker
Doesn't work... BUT... I DO IT!!! BUUTT... there's a bug.. See the video:

<object style="height: 344px; width: 425px"><param name="movie" value="http://www.youtube.com/v/b9M-t6H0iDU"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/b9M-t6H0iDU" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></object>


I use these RAMs:

$7E:1462 2 bytes Misc. Layer 1 X position (level) (16-bit)
$7E:1464 2 bytes Misc. Layer 1 Y position (level) (16-bit)

I just change the RAMs from your code.. How can I fix that?

Umm... what bug? I'm not seeing anything going wrong...
Now with extra girl and extra hacker
The Horizontal Scrolling.
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
Try editing the horizant scroll settings with the fish or lakitu button (can't remember) in LM in the desired level. Play around until it works.
layouts suck
I DISABLE both vertical and horizontal scroll..