airshipScroll.lua (SMM-Like Airship Camera)
Posted: Fri Dec 03, 2021 6:48 pm
This is a library that replicates the effect of an airship scrolling up and down seen in games such as Super Mario Bros. 3 and Super Mario Maker.

Additionally, this has some values that should be applied to the level's .lua file. Listed here are the values plus their defaults:
NOTE: Doesn't work 100% the best with autoscroll.lua. Both libraries do work with one-another, but the screen might snap into position once it's done autoscrolling vertically. If anyone wants to fix this feel free.
Edit: Fixed an issue where "shipWater" misaligns if a section that has airship scrolling is disabled.
Download:
https://pastebin.com/7tZPVMpq

Additionally, this has some values that should be applied to the level's .lua file. Listed here are the values plus their defaults:
Code: Select all
airshipScroll.sections = {0} --What sections the effect should be applied to. Note that this is a table.
airshipScroll.intensity = .01 --What speed should the effect should scroll at.
airshipScroll.movementLimit = 1 --How long should the effect should scroll for.
airshipScroll.movingLayer = "shipWater" --Whatever layer is here will scroll up and down with the screen, allowing you to have stuff like the water in SMB3's World 8-Ship.
Edit: Fixed an issue where "shipWater" misaligns if a section that has airship scrolling is disabled.
Download:
https://pastebin.com/7tZPVMpq