Page 1 of 1

falldamage.lua - Mario goes "ouch"

Posted: Fri Sep 04, 2020 9:19 am
by Akromaly
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

Re: falldamage.lua - Mario goes "ouch"

Posted: Fri Sep 04, 2020 9:26 am
by 9thCore
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

Re: falldamage.lua - Mario goes "ouch"

Posted: Fri Sep 04, 2020 9:28 am
by Akromaly
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!

Re: falldamage.lua - Mario goes "ouch"

Posted: Fri Sep 04, 2020 10:42 am
by WolfHero
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.

Re: falldamage.lua - Mario goes "ouch"

Posted: Wed Sep 09, 2020 6:09 pm
by Cedur
why not also make Mario scream when he falls from a really large height ...

Re: falldamage.lua - Mario goes "ouch"

Posted: Thu Sep 10, 2020 9:00 am
by Akromaly
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

Re: falldamage.lua - Mario goes "ouch"

Posted: Thu Sep 10, 2020 12:10 pm
by Taycamgame
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.

Re: falldamage.lua - Mario goes "ouch"

Posted: Thu Sep 10, 2020 12:19 pm
by krakin
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

Re: falldamage.lua - Mario goes "ouch"

Posted: Thu Sep 10, 2020 12:25 pm
by Taycamgame
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?

Re: falldamage.lua - Mario goes "ouch"

Posted: Thu Sep 10, 2020 3:08 pm
by 9thCore
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

Re: falldamage.lua - Mario goes "ouch"

Posted: Thu Sep 10, 2020 8:25 pm
by Wiimeiser
For a clean tutorial, force a point early on where Mario falls far enough to scream, but lands in water. Maybe.

Re: falldamage.lua - Mario goes "ouch"

Posted: Fri Sep 11, 2020 11:35 am
by krakin
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

Re: falldamage.lua - Mario goes "ouch"

Posted: Fri Sep 11, 2020 2:19 pm
by FireyPaperMario
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

Re: falldamage.lua - Mario goes "ouch"

Posted: Fri Jan 01, 2021 10:23 am
by Someone

Re: falldamage.lua - Mario goes "ouch"

Posted: Mon Jan 25, 2021 12:01 pm
by rael1up
hmmm... looks good, I will download it and try