falldamage.lua - Mario goes "ouch"

Share and discuss custom LunaLua code and content packs for SMBX2.
Akromaly
Bronze Yoshi Egg
Bronze Yoshi Egg
Posts: 425
Joined: Sun Mar 12, 2017 8:07 am
Flair: anemoia
Contact:

falldamage.lua - Mario goes "ouch"

Postby Akromaly » Fri Sep 04, 2020 9:19 am

I present you guys my very first lua library, which harms the player when they fall from too high, like in Super Mario 64. Did SMBX need this? Maybe not? Who knows, it's up to you to use it in some interesting ways. Here's some cool stuff about it though:

- Water does protect you from damage
- Being invincible also protects you, as you may expect
- You can customize how much you can fall in the code file



To use it, create a luna.lua file in your level/world folder with this code

Code: Select all

local falldamage = require("falldamage")
Download
Last edited by Akromaly on Fri Sep 04, 2020 9:28 am, edited 1 time in total.

9thCore
Rex
Rex
Posts: 37
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things
Pronouns: he/him

Re: falldamage.lua - Mario goes "ouch"

Postby 9thCore » Fri Sep 04, 2020 9:26 am

Pretty nice idea for a library, can't wait for what people will do with this!

Also, quick note, you should put this in your post instead of the old code

Code: Select all

local falldamage = require("falldamage")
The reason being that API.load is outdated and require does the same thing afaik

Akromaly
Bronze Yoshi Egg
Bronze Yoshi Egg
Posts: 425
Joined: Sun Mar 12, 2017 8:07 am
Flair: anemoia
Contact:

Re: falldamage.lua - Mario goes "ouch"

Postby Akromaly » Fri Sep 04, 2020 9:28 am

9thCore wrote:
Fri Sep 04, 2020 9:26 am
Pretty nice idea for a library, can't wait for what people will do with this!

Also, quick note, you should put this in your post instead of the old code

Code: Select all

local falldamage = require("falldamage")
The reason being that API.load is outdated and require does the same thing afaik
I'll immediately edit it, I always wondered what was the difference between the two. Thanks a lot!

WolfHero
Shy Guy
Shy Guy
Posts: 5
Joined: Thu May 07, 2020 11:41 pm

Re: falldamage.lua - Mario goes "ouch"

Postby WolfHero » Fri Sep 04, 2020 10:42 am

This could definitely be messed with to create a ground tremor attack when falling from enough height, too... Or maybe even a Zelda-like puzzle, something like the great deku tree's spider web puzzle. Get enough height, and you destroy things under you after you've been falling for a certain amount of time, stuff like standard breakables.

Lots of possibilities here. I don't know how to do these things, but I assume they're possible. And that's neat.

The fall damage effect itself, though, I don't see myself using... But that's just me. There's plenty of folk around here that could (and probably will) make use out of this for something interesting. I'm interested to see what that'd be.

Cedur
Raccoon Mario
Raccoon Mario
Posts: 7073
Joined: Tue Jun 28, 2016 10:14 am
Flair: I'm gone, for chess and minesweeper
Pronouns: he/him

Re: falldamage.lua - Mario goes "ouch"

Postby Cedur » Wed Sep 09, 2020 6:09 pm

why not also make Mario scream when he falls from a really large height ...

Akromaly
Bronze Yoshi Egg
Bronze Yoshi Egg
Posts: 425
Joined: Sun Mar 12, 2017 8:07 am
Flair: anemoia
Contact:

Re: falldamage.lua - Mario goes "ouch"

Postby Akromaly » Thu Sep 10, 2020 9:00 am

Cedur wrote:
Wed Sep 09, 2020 6:09 pm
why not also make Mario scream when he falls from a really large height ...
A thing I really like to do when making custom lua stuff is trying not to use non-basegame stuff, especially for sound effects, since I always happen to find something in the vanilla sounds that fits what I might need. But despite that this could be a nice touch, if people don't have a problem with that I could add that in a future version

Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1483
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Contact:

Re: falldamage.lua - Mario goes "ouch"

Postby Taycamgame » Thu Sep 10, 2020 12:10 pm

Cedur wrote:
Wed Sep 09, 2020 6:09 pm
why not also make Mario scream when he falls from a really large height ...
Would sound pretty cool. Ha.

Also I don't know how i feel about this being used in levels / episodes. Unless the creator shows that it is being used, it's likely going to end with a bunch of surprise deaths.

krakin
Birdo
Birdo
Posts: 2892
Joined: Sun Dec 11, 2016 8:02 pm
Flair: i wish squids and octos were real
Pronouns: he/him
Contact:

Re: falldamage.lua - Mario goes "ouch"

Postby krakin » Thu Sep 10, 2020 12:19 pm

Taycamgame wrote:
Thu Sep 10, 2020 12:10 pm
Cedur wrote:
Wed Sep 09, 2020 6:09 pm
why not also make Mario scream when he falls from a really large height ...
Would sound pretty cool. Ha.

Also I don't know how i feel about this being used in levels / episodes. Unless the creator shows that it is being used, it's likely going to end with a bunch of surprise deaths.
They can just put a reminder in their posts that there's fall damage

Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1483
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Contact:

Re: falldamage.lua - Mario goes "ouch"

Postby Taycamgame » Thu Sep 10, 2020 12:25 pm

Rhosty wrote:
Thu Sep 10, 2020 12:19 pm
Taycamgame wrote:
Thu Sep 10, 2020 12:10 pm
Cedur wrote:
Wed Sep 09, 2020 6:09 pm
why not also make Mario scream when he falls from a really large height ...
Would sound pretty cool. Ha.

Also I don't know how i feel about this being used in levels / episodes. Unless the creator shows that it is being used, it's likely going to end with a bunch of surprise deaths.
They can just put a reminder in their posts that there's fall damage
Even still, I know for a fact that I would tend to forget about it and just jump off a cliff thinking i'll be fine, and end up dying to it.
I mean, it's realistic, sure. It's pretty cool too, but is it necessary?

9thCore
Rex
Rex
Posts: 37
Joined: Tue Mar 10, 2015 1:46 pm
Flair: am stupeed guy making stupeed things
Pronouns: he/him

Re: falldamage.lua - Mario goes "ouch"

Postby 9thCore » Thu Sep 10, 2020 3:08 pm

Taycamgame wrote:
Thu Sep 10, 2020 12:25 pm
Rhosty wrote:
Thu Sep 10, 2020 12:19 pm
Taycamgame wrote:
Thu Sep 10, 2020 12:10 pm


Would sound pretty cool. Ha.

Also I don't know how i feel about this being used in levels / episodes. Unless the creator shows that it is being used, it's likely going to end with a bunch of surprise deaths.
They can just put a reminder in their posts that there's fall damage
Even still, I know for a fact that I would tend to forget about it and just jump off a cliff thinking i'll be fine, and end up dying to it.
I mean, it's realistic, sure. It's pretty cool too, but is it necessary?
Will be necessary when somebody recreates Minecraft in x2

Wiimeiser
Snifit
Snifit
Posts: 215
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: falldamage.lua - Mario goes "ouch"

Postby Wiimeiser » Thu Sep 10, 2020 8:25 pm

For a clean tutorial, force a point early on where Mario falls far enough to scream, but lands in water. Maybe.

krakin
Birdo
Birdo
Posts: 2892
Joined: Sun Dec 11, 2016 8:02 pm
Flair: i wish squids and octos were real
Pronouns: he/him
Contact:

Re: falldamage.lua - Mario goes "ouch"

Postby krakin » Fri Sep 11, 2020 11:35 am

Taycamgame wrote:
Thu Sep 10, 2020 12:25 pm
Rhosty wrote:
Thu Sep 10, 2020 12:19 pm
Taycamgame wrote:
Thu Sep 10, 2020 12:10 pm


Would sound pretty cool. Ha.

Also I don't know how i feel about this being used in levels / episodes. Unless the creator shows that it is being used, it's likely going to end with a bunch of surprise deaths.
They can just put a reminder in their posts that there's fall damage
Even still, I know for a fact that I would tend to forget about it and just jump off a cliff thinking i'll be fine, and end up dying to it.
I mean, it's realistic, sure. It's pretty cool too, but is it necessary?
its neseeracry because I sid it is people be getting confuedsed what the hil

FireyPaperMario
Wart
Wart
Posts: 6206
Joined: Sat Sep 27, 2014 1:39 pm
Flair: 90's kid born in late 1993 ^_^"
Pronouns: He/Him
Contact:

Re: falldamage.lua - Mario goes "ouch"

Postby FireyPaperMario » Fri Sep 11, 2020 2:19 pm

I was hoping someone in the SMBX community would make a lua code for "Falling Damage". This'll come in handy for making some tricky One-Screen Arcade Level* style stuff I might make in the future. I'm so gonna download this. ^^"


*You know, like Donkey Kong, Donkey Kong Jr., etc. :P

Someone
Koopa
Koopa
Posts: 17
Joined: Tue Dec 15, 2020 8:40 am

Re: falldamage.lua - Mario goes "ouch"

Postby Someone » Fri Jan 01, 2021 10:23 am


rael1up
Shy Guy
Shy Guy
Posts: 6
Joined: Thu Jan 14, 2021 8:27 am
Pronouns: he/him

Re: falldamage.lua - Mario goes "ouch"

Postby rael1up » Mon Jan 25, 2021 12:01 pm

hmmm... looks good, I will download it and try


Return to “LunaLua”

Who is online

Users browsing this forum: afanguy, MrNameless and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari