betterAutoscroll.lua UPDATE 2.0

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

Davice
Shy Guy
Shy Guy
Posts: 6
Joined: Fri Oct 25, 2024 4:23 pm
Pronouns: he/him

betterAutoscroll.lua UPDATE 2.0

Postby Davice » Wed Nov 06, 2024 7:47 pm



An alternative to the classic autoscroll.lua with various advantages:
- Smoother Scrolling
- Smooth Change of Speed and Direction
- Controlling Blocks you can place around in your Level to Control Scrolling according to your will

NOW SUPPORTS MULTIPLE SECTIONS AND CHECKPOINTS

Download (Tutorial included):
https://workupload.com/file/Qrw7AXtkDjt
Last edited by Davice on Mon Jun 09, 2025 2:20 pm, edited 3 times in total.

Pixelated_Perfection
Bot
Bot
Posts: 57
Joined: Fri Feb 25, 2022 1:23 pm
Pronouns: She/They

Re: betterAutoscroll.lua

Postby Pixelated_Perfection » Fri Nov 08, 2024 1:01 pm

oh hell yeah

MarioChallengerX2
Buster Beetle
Buster Beetle
Posts: 89
Joined: Sat Dec 31, 2022 4:34 pm
Pronouns: he/him

Re: betterAutoscroll.lua

Postby MarioChallengerX2 » Sat Nov 16, 2024 3:52 pm

I just realized there's another problem with this library. Moving left makes Mario die for some reason.

Davice
Shy Guy
Shy Guy
Posts: 6
Joined: Fri Oct 25, 2024 4:23 pm
Pronouns: he/him

Re: betterAutoscroll.lua

Postby Davice » Thu Nov 21, 2024 10:50 am

MarioChallengerX2 wrote:
Sat Nov 16, 2024 3:52 pm
I just realized there's another problem with this library. Moving left makes Mario die for some reason.
This actually was my intention. I wanted to mimic the autoscroll of Super Mario 3d World where the player also dies when he goes offscreen. Removing the kill player function out of the script will remove this feature.

Trilogy
2025 Egg Hunter
2025 Egg Hunter
Posts: 378
Joined: Thu Jul 25, 2024 5:34 am
Flair: i forget things
Pronouns: he/him/ham/his/hit

Re: betterAutoscroll.lua

Postby Trilogy » Thu Nov 21, 2024 12:48 pm

Davice wrote:
Wed Nov 06, 2024 7:47 pm


An alternative to the classic autoscroll.lua with various advantages:
- Smoother Scrolling
- Smooth Change of Speed and Direction
- Controlling Blocks you can place around in your Level to Control Scrolling according to your will

Known Issues:
- Currently works at one Section only
- Checkpoints doesn't work at this moment
(both issues will be fixed soon)

Download (Tutorial included):
Finnaly, i dont have to work with choppy autoscroll nor i have to code! Thank you very much, Davice!

Alucard648
Flurry
Flurry
Posts: 177
Joined: Sun Aug 16, 2015 3:45 am

Re: betterAutoscroll.lua

Postby Alucard648 » Mon Nov 25, 2024 3:45 am

Not useable at all until Multi-section and checkpoints support are done.

Dura785
Bob-Omb
Bob-Omb
Posts: 22
Joined: Thu Jan 02, 2025 5:16 pm
Pronouns: he/him

Re: betterAutoscroll.lua Error

Postby Dura785 » Sun Jan 05, 2025 9:12 pm

There is an error that betterSMWCamera.lua is missing
Image
You know what it is?

Ibaka
Blooper
Blooper
Posts: 159
Joined: Wed Apr 20, 2022 8:27 am
Flair: Nothing
Pronouns: he/him

Re: betterAutoscroll.lua

Postby Ibaka » Fri Jan 10, 2025 9:09 am

thats cool

Davice
Shy Guy
Shy Guy
Posts: 6
Joined: Fri Oct 25, 2024 4:23 pm
Pronouns: he/him

Re: betterAutoscroll.lua Error

Postby Davice » Sat Jan 11, 2025 6:48 pm

Dura785 wrote:
Sun Jan 05, 2025 9:12 pm
There is an error that betterSMWCamera.lua is missing
Image
You know what it is?
Oh thats just from the example level. In my episode I use a custom camera logic and I had to deactivate it for this specific level. Just go into the luna.lua of the level and remove every line of code which contains "betterSMWCamera" :)

Bowl_of_Oatmeal
Koopa
Koopa
Posts: 18
Joined: Fri Sep 18, 2020 11:17 pm
Pronouns: He/Him

Re: betterAutoscroll.lua UPDATE 2.0

Postby Bowl_of_Oatmeal » Sun Jul 06, 2025 3:04 pm

When disabling auto scrolling in a section using this function...

function onSectionChange(id, player)
if id == 1 then
betterAutoscroll.enabled = false
end
end

The camera doesn't move even though the section is horizontally large.
Image

In this image, Mario should be in the center of the screen, but he's at the end which means the camera isn't moving like it should.
This is the correct section as using the autoscroll objects doesn't move the camera.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari