Adjusting Moving Layer Speed

General discussion about Super Mario Bros. X.

Moderator: Userbase Moderators

sofiavergao
Goomba
Goomba
Posts: 1
Joined: Tue Oct 31, 2017 5:23 am

Adjusting Moving Layer Speed

Postby sofiavergao » Tue Oct 31, 2017 5:27 am

I actually don't want to open up a whole new topic just for a little question I want to ask, but I need to learn that as I plan to use moving layers in my future levels and I guess lots of people would also want to do that, so it'd be useful for a lot of people I guess. My question is, I am sure that there was a formula by which you could adjust your moving layer to move exactly how many pixels you want it to move, and even though I did lots of research (like two minutes maybe) I couldn't find it. So does anyone have it, or do any of you guys know any other way that I could precisely adjust the speed of a layer to make it move exactly as I wish? I don't want to test a level over and over again until I find a good speed for a layer, and I bet no one does. Thanks in advance.

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Adjusting Moving Layer Speed

Postby Hoeloe » Tue Oct 31, 2017 6:40 am

The best way to do this is through LunaLua. You can set layer speeds (in pixels per frame) there, and if you set it to number of pixels/lunatime.toTicks (number of seconds) you can use either eventu or a manual timer to stop the layer at a very specific time.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Adjusting Moving Layer Speed

Postby PixelPest » Tue Oct 31, 2017 6:43 am

If you don't want to use LunaLua you can calculate how far to move your layers with this: viewtopic.php?f=35&t=4928. Just make sure you use 2500/39 instead of 65


Return to “General”

Who is online

Users browsing this forum: Ahrefs [Bot], Petal [Bot] and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari