Dive.lua 1.3 (Super Mario Odyssey's Dive)

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

Moderator: Userbase Moderators

MegoZ_
Spiny
Spiny
Posts: 25
Joined: Mon Jun 04, 2018 10:25 am
Pronouns: he/him
Contact:

Dive.lua 1.3 (Super Mario Odyssey's Dive)

Postby MegoZ_ » Thu Jun 30, 2022 9:15 am

This script allows the player to dive like in Super Mario Odyssey.
Works for 2 players
Compatible with "twirl.lua!"

* Press both Alt-Jump/Spin key AND Down key at the same time in mid-air.

Use dive.showMeDebug = true to show funny debug stuff
You can also use dive.allowEveryCharacter= true to allow every character to dive, though I wouldn't recommend, toad will disappear and talk like mario when diving :? ...

(1.2.1) You can now dive when slow falling with a tanookie suit.
(1.3) There's now only one audio and Luigi can now dive.

Video Preview:
Spoiler: show
1.0:

How to install:
Spoiler: show
1. Extract both "dive.lua" and the ".flac" audio files together into your episode/level folder.
2. Paste the following line into your level/episode's luna.lua file.

Code: Select all

dive = require("dive")
If you're installing this with twirl.lua, make sure they are on the same folder, and they are loaded into the same level/episode!

Download (Zip file, v1.3):
MEGA: https://mega.nz/file/p0lnSSaR#YS81KnTBt ... It522vdMgk
MEDIAFIRE: https://www.mediafire.com/file/cve3fh0r ... o.zip/file
Quick Pastebin (Only for Updates!): https://pastebin.com/LcWe4JVh

Last edited by MegoZ_ on Sun Aug 07, 2022 6:38 am, edited 7 times in total.

georgespezi12
Buster Beetle
Buster Beetle
Posts: 99
Joined: Mon Jun 01, 2020 3:45 am

Re: Dive.lua (Super Mario Odyssey's Dive)

Postby georgespezi12 » Thu Jun 30, 2022 10:17 am

The input execution is too precise for high action stages.

You have to press the inputs correctly, otherwise Mario ducks and the dash isn't executed

MegoZ_
Spiny
Spiny
Posts: 25
Joined: Mon Jun 04, 2018 10:25 am
Pronouns: he/him
Contact:

Re: Dive.lua (Super Mario Odyssey's Dive)

Postby MegoZ_ » Thu Jun 30, 2022 2:37 pm

georgespezi12 wrote:
Thu Jun 30, 2022 10:17 am
The input execution is too precise for high action stages.

You have to press the inputs correctly, otherwise Mario ducks and the dash isn't executed
I never thought that would be a problem since I always first pressed altJump and then down, next release I will make it that both ways work, thanks for the feedback!!

Chanceux2
Volcano Lotus
Volcano Lotus
Posts: 576
Joined: Mon Dec 16, 2019 3:39 pm
Flair: People don't care about my threads! :(
Contact:

Re: Dive.lua (Super Mario Odyssey's Dive)

Postby Chanceux2 » Thu Jun 30, 2022 2:39 pm

Could you also post the link to the YouTube video because I can't watch it

MegoZ_
Spiny
Spiny
Posts: 25
Joined: Mon Jun 04, 2018 10:25 am
Pronouns: he/him
Contact:

Re: Dive.lua (Super Mario Odyssey's Dive)

Postby MegoZ_ » Thu Jun 30, 2022 2:56 pm

Chanceux2 wrote:
Thu Jun 30, 2022 2:39 pm
Could you also post the link to the YouTube video because I can't watch it
Here:
https://youtu.be/7ujPvJvSPLM
You can also refresh the page. The forum sometimes decides it wants to load the video

also...
georgespezi12 wrote:
Thu Jun 30, 2022 10:17 am
The input execution is too precise for high action stages.

You have to press the inputs correctly, otherwise Mario ducks and the dash isn't executed
The pastebin code has been updated so you can dive while ducking. You can copy the code and replace everything in the dive.lua script. I will also update the mega and mediafire links in a minute if you'd like to download from that!

Chanceux2
Volcano Lotus
Volcano Lotus
Posts: 576
Joined: Mon Dec 16, 2019 3:39 pm
Flair: People don't care about my threads! :(
Contact:

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Postby Chanceux2 » Thu Jun 30, 2022 3:43 pm

So I tried to test this out and then I got this:

[url=https://postimg.cc/nX0S99xr][img]https://i.postimg.cc/nX0S99xr/Debug-6-3 ... -44-PM.png[/img][/url]

MegoZ_
Spiny
Spiny
Posts: 25
Joined: Mon Jun 04, 2018 10:25 am
Pronouns: he/him
Contact:

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Postby MegoZ_ » Thu Jun 30, 2022 4:01 pm

Chanceux2 wrote:
Thu Jun 30, 2022 3:43 pm
So I tried to test this out and then I got this:

Image

Are you trying to load this with twirl.lua or is it only dive.lua?
They must retain the same file name and include the .flac audio files. I think they should also be loaded on the same luna.lua file, I recommend calling them in the episode's luna.lua file.

Try updating it and see if the issue is still present. By updating I mean redownload the scripts...

Chanceux2
Volcano Lotus
Volcano Lotus
Posts: 576
Joined: Mon Dec 16, 2019 3:39 pm
Flair: People don't care about my threads! :(
Contact:

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Postby Chanceux2 » Thu Jun 30, 2022 4:44 pm

1. I'm using both twirl.lua and dive.lua
2. Yes I'm using the episode luna.lua file and I'll update it and check it out

Edit: Nope, same results, I'm getting the same error
Last edited by Chanceux2 on Thu Jun 30, 2022 4:51 pm, edited 1 time in total.

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

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Postby AirShip » Thu Jun 30, 2022 4:50 pm

Exactly what I was looking for, but unfortunately no compatibility with the other characters.
Do you have plans to make this compatible with the other main characters?

Marioman2007
2025 Egg Hunter
2025 Egg Hunter
Posts: 544
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Postby Marioman2007 » Thu Jun 30, 2022 11:31 pm

AirShip wrote:
Thu Jun 30, 2022 4:50 pm
Exactly what I was looking for, but unfortunately no compatibility with the other characters.
Do you have plans to make this compatible with the other main characters?
Removing this line works for me:
Image

Oh and you also need to remove the "and" at line 81.

MegoZ_
Spiny
Spiny
Posts: 25
Joined: Mon Jun 04, 2018 10:25 am
Pronouns: he/him
Contact:

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Postby MegoZ_ » Fri Jul 01, 2022 7:24 am

Chanceux2 wrote:
Thu Jun 30, 2022 4:44 pm
1. I'm using both twirl.lua and dive.lua
2. Yes I'm using the episode luna.lua file and I'll update it and check it out

Edit: Nope, same results, I'm getting the same error

It seems to be a problem with the dive.lua script you have. Can you send me both of your twirl.lua and dive.lua files so I can get a look at them? I've tried to recreate the issue but it still works fine for me with the downloads and the pastebin...

In any case, make sure you called both libraries in only one of these three ways:
Image
code to copy: show

Code: Select all

require("twirl")
require("dive")
---OR------------------------
twirl = require("twirl")
dive = require("dive")
---OR------------------------
local twirl = require("twirl")
local dive = require("dive")

If the pastebin of twirl.lua and dive.lua are identical to the files you have, then you should try updating SMBX2 just in case, this is only as a last ditch effort!

I hope this helps!

ShadowXeldron
Snifit
Snifit
Posts: 232
Joined: Sun Dec 08, 2019 8:21 am
Flair: phpBB > ProBoards
Pronouns: He/Him
Contact:

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Postby ShadowXeldron » Sat Jul 02, 2022 9:41 am

Why are you using FLACs? Those take up a lot of space. I'd suggest converting it to an OGG and changing the code accordingly.

MegoZ_
Spiny
Spiny
Posts: 25
Joined: Mon Jun 04, 2018 10:25 am
Pronouns: he/him
Contact:

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Postby MegoZ_ » Sat Jul 02, 2022 2:05 pm

Dragon0307 wrote:
Sat Jul 02, 2022 9:41 am
Why are you using FLACs? Those take up a lot of space. I'd suggest converting it to an OGG and changing the code accordingly.
hehe... I like flac. But sure, I will change it eventually since I am looking for the ripped sfx from the game without mario's voice. Those flac files were created by a recording from the video capture thingy on my Switch.

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Postby MrDoubleA » Sat Jul 02, 2022 8:26 pm

MegoZ_ wrote:
Sat Jul 02, 2022 2:05 pm
Dragon0307 wrote:
Sat Jul 02, 2022 9:41 am
Why are you using FLACs? Those take up a lot of space. I'd suggest converting it to an OGG and changing the code accordingly.
hehe... I like flac. But sure, I will change it eventually since I am looking for the ripped sfx from the game without mario's voice. Those flac files were created by a recording from the video capture thingy on my Switch.
By the way, audio in switch recordings is of course compressed, so there's not really any benefit to using flac.

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

Re: Dive.lua 1.1 (Super Mario Odyssey's Dive)

Postby AirShip » Tue Jul 05, 2022 2:03 pm

Marioman2007 wrote:
Thu Jun 30, 2022 11:31 pm
AirShip wrote:
Thu Jun 30, 2022 4:50 pm
Exactly what I was looking for, but unfortunately no compatibility with the other characters.
Do you have plans to make this compatible with the other main characters?
Removing this line works for me:
Image

Oh and you also need to remove the "and" at line 81.
Oh yes, that solves the problem, thank you very much!
btw, great job! I've never had so much fun with a lunalua!

Woshee_real
Shy Guy
Shy Guy
Posts: 9
Joined: Sat Oct 17, 2020 8:10 pm
Flair: GO NUTS!
Contact:

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Postby Woshee_real » Wed Jul 06, 2022 12:29 am

You could replace a mario sound effect for a sonic one and use the homing attack sound effect instead.

Chanceux2
Volcano Lotus
Volcano Lotus
Posts: 576
Joined: Mon Dec 16, 2019 3:39 pm
Flair: People don't care about my threads! :(
Contact:

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Postby Chanceux2 » Tue Aug 02, 2022 11:09 pm

Sorry if this is considered a bump but is it possible to make it compatible with GroundPound.lua

Link: https://smbxgame.com/forums/view ... 01&t=24920

MegoZ_
Spiny
Spiny
Posts: 25
Joined: Mon Jun 04, 2018 10:25 am
Pronouns: he/him
Contact:

Re: Dive.lua 1.2.1 (Super Mario Odyssey's Dive)

Postby MegoZ_ » Sat Aug 06, 2022 12:02 pm

Chanceux2 wrote:
Tue Aug 02, 2022 11:09 pm
Sorry if this is considered a bump but is it possible to make it compatible with GroundPound.lua

Link: https://smbxgame.com/forums/view ... 01&t=24920
It should work fine
Also, I'm working on a new update but it's taking longer because I still need to tweak some things, and lost a bit of motivation. It will eventually come out...

jro
Goomba
Goomba
Posts: 1
Joined: Fri Jun 14, 2024 6:56 pm
Pronouns: he/him

Re: Dive.lua 1.3 (Super Mario Odyssey's Dive)

Postby jro » Fri Jun 14, 2024 7:01 pm

I re keybinded it so its compatiable with ground pound aswell!!
enjoy ig
https://mega.nz/file/w3UWgYYR#JH4fVYUGs ... H8t9tThDGs


Return to “LunaLua”

Who is online

Users browsing this forum: Petal [Bot], Starshi and 4 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari