Page 1 of 1

somersault.lua - Roll, dash, dodge & then some! [2.5.0 - Another update already lol]

Posted: Fri Nov 10, 2023 5:10 am
by John Nameless

Hey there once again!

Here's a library that let's you roll when sliding & do a somersault by pressing altRun + down, which lets you gain a burst speed & even makes you invincible for a short time!


You can also configure the library with the following:
CONFIG SETTINGS: show
- somersault.enabled - can the player be able to somersault?
- somersault.slideRoll - can the player also be able to roll when simply sliding?
- somersault.barrelRoll - can the player also be able to roll when being shot out of a barrel?
- somersault.allowFlash - should the player flash white upon starting a somersault?
- somersault.setiFrames - how many frames will the player be invincible when initiating a somersault?
- somersault.setCooldown - how many frames will it take before the player can somersault again after doing one?
- somersault.initSpeedX - how much HORIZONTAL speed will the player get when initiating a somersault?
- somersault.initSpeedY - how much VERTICAL speed will the player get when initiating a somersault?
- somersault.inputsNeeded - what are the inputs needed to perform a somersault?



Image


HOW TO IMPLEMENT: show
1. Install the file in the link below then copy & paste it to the level/episode folder of your choice.
2. In that level/episode's "luna.lua" file, copy & paste this line below on the top part of said "luna.lua" file:

Code: Select all

local somersault = require("somersault") 
3. Save the "luna.lua" file then open up the level/episode & press altRun + Down to do a somersault!


Image

DOWNLOAD: https://drive.google.com/file/d/1DiAS-9 ... drive_link


Re: somersault.lua - Roll, dash, dodge & then some!

Posted: Fri Nov 10, 2023 9:06 am
by AirShip
Definitely a "must-use" for a future project for sure!
Very good work.

Re: somersault.lua - Roll, dash, dodge & then some!

Posted: Fri Nov 10, 2023 4:46 pm
by Lunar Chris
This is actually cool! Does it also work for other characters?

Re: somersault.lua - Roll, dash, dodge & then some!

Posted: Fri Nov 10, 2023 5:28 pm
by John Nameless
Lunar Chris wrote:
Fri Nov 10, 2023 4:46 pm
This is actually cool! Does it also work for other characters?
The script technically could work with other characters that aren't Toad, Peach, Link or any other characters that use them as a base, as the only thing stopping it work with other characters is two simple checks to see if the player's character is either Mario or Luigi.

That said, I haven't tested the script on them so

Re: somersault.lua - Roll, dash, dodge & then some!

Posted: Fri Nov 10, 2023 11:09 pm
by TheGameyFireBro105
Wait hold on do we now have all of SMO's moveset in the game now?

Re: somersault.lua - Roll, dash, dodge & then some!

Posted: Sat Nov 11, 2023 12:41 am
by mariobrigade2018
TheGameyFireBro105 wrote:
Fri Nov 10, 2023 11:09 pm
Wait hold on do we now have all of SMO's moveset in the game now?
Cappy.

Re: somersault.lua - Roll, dash, dodge & then some!

Posted: Fri Nov 17, 2023 9:16 pm
by HAK0TA538
TheGameyFireBro105 wrote:
Fri Nov 10, 2023 11:09 pm
Wait hold on do we now have all of SMO's moveset in the game now?
According to google:

Mario maintains his moveset from previous 3D titles, including the Triple Jump, the Long Jump, the Side Somersault, the Backward Somersault, the Roll, the Ground Pound, the Ground Pound Jump, the Spin Jump, and the returning dive.

2 of those are in this very pack, we just need a long jump lua and a backwards somersault lua and we got it

Re: somersault.lua - Roll, dash, dodge & then some!

Posted: Mon Apr 29, 2024 12:23 pm
by Spudly
whenever i somersault to the left this strange effect happens
i am using CaptainMonochrome's SMM2 SMW Mario costume
Image

Re: somersault.lua - [2.0 - Do a barrel roll!] Roll, dash, dodge & then some!

Posted: Sat May 18, 2024 6:43 am
by John Nameless
Hello!

I recently overhauled my somersault script to 2.0 for a more well written script + added rolling after being shot out of a barrel as a new optional setting!

Image


Re: somersault.lua - Roll, dash, dodge & then some! [2.5.0 - Another update already lol]

Posted: Sun May 19, 2024 9:07 am
by John Nameless
I know it's been a day but here's another semi major update to somersault lol
Patch Notes: show
- Fixed showing the slide animation when somersaulting for a certain time with slideRoll turned off
- Added anotherwalljump compatibilty to prevent rolling while wall-sliding
- Added a white flash upon somersaulting to indicate how many i-frames the player has left.

Re: somersault.lua - Roll, dash, dodge & then some! [2.5.0 - Another update already lol]

Posted: Mon May 20, 2024 4:38 am
by Just_Thomas
MrNameless wrote:
Sun May 19, 2024 9:07 am
I know it's been a day but here's another semi major update to somersault lol
Patch Notes: show
- Fixed showing the slide animation when somersaulting for a certain time with slideRoll turned off
- Added anotherwalljump compatibilty to prevent rolling while wall-sliding
- Added a white flash upon somersaulting to indicate how many i-frames the player has left.
I hope this question doesn't seem too annoying as a request, but: Is there a chance that this could ONLY work for the barrels (i.e. when the player is ejected from a barrel) and otherwise somersault.lua is not active?
(I have not downloaded your work yet and therefore not tested what can be done with it)

Re: somersault.lua - Roll, dash, dodge & then some! [2.5.0 - Another update already lol]

Posted: Thu Apr 24, 2025 6:22 pm
by PizzaNoob
Ok, I have encountered a bit of a weird bug...
I changed some code to allow Toad to somerSault, but when I do so, Toad´s images flicker and stop rolling earlier than the characters normally allowed to somerSault. Here´s two gifs to better explain...

when mario somerSaults
Image

when toad somerSaults
Image

Re: somersault.lua - Roll, dash, dodge & then some! [2.5.0 - Another update already lol]

Posted: Thu Apr 24, 2025 6:35 pm
by John Nameless
PizzaNoob wrote:
Thu Apr 24, 2025 6:22 pm
There is a reason why I only left it to support Mario & Luigi by default.
somersault.lua requires the slide ability in order to work properly, as that handles most of the physics.
Which usually only Mario & Luigi can do. Because of this, Peach, Toad, Link, & any SMBX2 character that uses them as a base can't use somersault since they don't have the ability to slide sadly

Re: somersault.lua - Roll, dash, dodge & then some! [2.5.0 - Another update already lol]

Posted: Thu Apr 24, 2025 6:55 pm
by PizzaNoob
MrNameless wrote:
Thu Apr 24, 2025 6:35 pm
There is a reason why I only left it to support Mario & Luigi by default.
somersault.lua requires the slide ability in order to work properly, as that handles most of the physics.
Which usually only Mario & Luigi can do. Because of this, Peach, Toad, Link, & any SMBX2 character that uses them as a base can't use somersault since they don't have the ability to slide sadly
Ah, that makes much more sense! I do plan to input code in order to allow Toad to slide (and ride Yoshi) in the future (probably not possible), but I think even that might not help... thanks for replying though :D

Re: somersault.lua - Roll, dash, dodge & then some! [2.5.0 - Another update already lol]

Posted: Mon Jun 16, 2025 5:46 pm
by JFMasta64
It Glitches out when you try sliding down a slope as Wario

Image