Page 1 of 1

Adjusting Moving Layer Speed

Posted: Tue Oct 31, 2017 5:27 am
by sofiavergao
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.

Re: Adjusting Moving Layer Speed

Posted: Tue Oct 31, 2017 6:40 am
by Hoeloe
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.

Re: Adjusting Moving Layer Speed

Posted: Tue Oct 31, 2017 6:43 am
by PixelPest
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