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

Share and discuss custom LunaLua code and content packs for SMBX2.
MrNameless
Swooper
Swooper
Posts: 58
Joined: Mon Jul 10, 2023 11:40 pm
Flair: vidio gaem

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

Postby MrNameless » Fri Nov 10, 2023 5:10 am


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

Last edited by MrNameless on Sun May 19, 2024 6:26 pm, edited 8 times in total.

AirShip
Panser
Panser
Posts: 1066
Joined: Wed Jan 01, 2014 1:30 am
Flair: The Flying Ghost
Contact:

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

Postby AirShip » Fri Nov 10, 2023 9:06 am

Definitely a "must-use" for a future project for sure!
Very good work.

Lunar Chris
Monty Mole
Monty Mole
Posts: 134
Joined: Mon Jan 06, 2014 9:51 pm
Flair: Moon Lord's Servant
Contact:

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

Postby Lunar Chris » Fri Nov 10, 2023 4:46 pm

This is actually cool! Does it also work for other characters?

MrNameless
Swooper
Swooper
Posts: 58
Joined: Mon Jul 10, 2023 11:40 pm
Flair: vidio gaem

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

Postby MrNameless » Fri Nov 10, 2023 5:28 pm

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

TheGameyFireBro105
Eerie
Eerie
Posts: 744
Joined: Thu Jan 09, 2020 6:09 pm
Flair: Good at remakes
Pronouns: he/him

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

Postby TheGameyFireBro105 » Fri Nov 10, 2023 11:09 pm

Wait hold on do we now have all of SMO's moveset in the game now?

mariobrigade2018
Ripper II
Ripper II
Posts: 303
Joined: Wed May 24, 2023 7:00 pm
Flair: Normie in coding who dreams of making a Mario game
Pronouns: he/him

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

Postby mariobrigade2018 » Sat Nov 11, 2023 12:41 am

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.

HAK0TA538
Bob-Omb
Bob-Omb
Posts: 22
Joined: Wed Oct 18, 2023 11:57 pm
Flair: Lua is cool
Pronouns: He/Him

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

Postby HAK0TA538 » Fri Nov 17, 2023 9:16 pm

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

Spudly
Shy Guy
Shy Guy
Posts: 6
Joined: Sun Mar 17, 2024 3:37 am

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

Postby Spudly » Mon Apr 29, 2024 12:23 pm

whenever i somersault to the left this strange effect happens
i am using CaptainMonochrome's SMM2 SMW Mario costume
Image

MrNameless
Swooper
Swooper
Posts: 58
Joined: Mon Jul 10, 2023 11:40 pm
Flair: vidio gaem

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

Postby MrNameless » Sat May 18, 2024 6:43 am

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


MrNameless
Swooper
Swooper
Posts: 58
Joined: Mon Jul 10, 2023 11:40 pm
Flair: vidio gaem

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

Postby MrNameless » 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.

Just_Thomas
Spike
Spike
Posts: 274
Joined: Sat Dec 16, 2023 3:32 am
Pronouns: he/him

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

Postby Just_Thomas » Mon May 20, 2024 4:38 am

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)


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari