Share and discuss custom LunaLua code and content packs for SMBX2.
Moderator: Userbase Moderators
|
|
|
|
-
The Dwarven Digger
- Lakitu

- Posts: 484
- Joined: Sun Oct 30, 2016 11:17 am
- Pronouns: they/them
Postby The Dwarven Digger » Sun Jan 06, 2019 1:13 pm
This is something I've been playing with and I thought I'd share it on here. You can use it to make any NPC split into any other NPC (even itself!) upon death. Probably not the most useful library but definitely fun to play with. You could use it to replicate the SMM big goombas, or just be evil and make a coin split into 100 rinkas. Whatever you feel like doing.
Screenshots
How to use
Copy into your level or episode file and add the following to your lunadll.lua file (or lunaworld.lua for episode-wide use)
Code: Select all local SplitUp = API.load("SplitUp")
Code: Select all SplitUp.addEntries{{a, b, c},{a, b, c}...}
Each entry {a, b, c} has three (or two) numbers:
a: The ID of the NPC you want to split when killed
b: The ID of the NPC you want NPC a to split into
c (optional): The number of new NPCs you want it to split into (default is 2)
You can add multiple entries separated by commas
Download
Clicky clicky
Documentation is provided within the lua file.
|
|
|
|
|
|
|
|
|
-
squp
- Snifit

- Posts: 211
- Joined: Sat Aug 12, 2017 10:10 pm
- Flair: worm
- Pronouns: she/it
-
Contact:
Postby squp » Sun Jan 06, 2019 2:06 pm
it's not an API, it's a helper library. Lunalua is the API.
|
|
|
|
|
|
|
|
|
-
The Dwarven Digger
- Lakitu

- Posts: 484
- Joined: Sun Oct 30, 2016 11:17 am
- Pronouns: they/them
Postby The Dwarven Digger » Sun Jan 06, 2019 2:49 pm
FlatKiwi wrote: ↑Sun Jan 06, 2019 2:06 pm
it's not an API, it's a helper library. Lunalua is the API.
Oh, I thought it was called an API because of the API.load function.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Sun Jan 06, 2019 3:07 pm
The Dwarven Digger wrote: ↑Sun Jan 06, 2019 2:49 pm
FlatKiwi wrote: ↑Sun Jan 06, 2019 2:06 pm
it's not an API, it's a helper library. Lunalua is the API.
Oh, I thought it was called an API because of the API.load function.
The Lunalua API is what does the loading.
|
|
|
|
|
|
|
|
|
-
Eri7
- Banned
- Posts: 1770
- Joined: Sat Jan 28, 2017 4:48 pm
- Flair: Good Foundation allows for strong Execution
-
Contact:
Postby Eri7 » Sun Jan 06, 2019 3:24 pm
Oh cool, this might be useful for me.
|
|
|
|
|
|
|
|
|
-
IttaBaby
- Bot

- Posts: 55
- Joined: Sat Apr 08, 2017 8:19 pm
Postby IttaBaby » Fri Feb 22, 2019 3:16 pm
I'm much too stupid to figure this out? I learn best by example, could someone make like a one room level with 1 npc who uses this? Maybe? Please?
|
|
|
|
|
|
|
|
|
-
TheNightingale
- Van De Graf

- Posts: 1980
- Joined: Fri Apr 20, 2018 9:28 pm
- Flair: I used to be called Scroll
- Pronouns: he/him
-
Contact:
Postby TheNightingale » Fri Feb 22, 2019 3:41 pm
IttaBaby wrote: ↑Fri Feb 22, 2019 3:16 pm
I'm much too stupid to figure this out? I learn best by example, could someone make like a one room level with 1 npc who uses this? Maybe? Please?
The main post has a GIF example, did you realize?
|
|
|
|
|
|
|
|
|
-
IttaBaby
- Bot

- Posts: 55
- Joined: Sat Apr 08, 2017 8:19 pm
Postby IttaBaby » Sat Feb 23, 2019 8:06 am
VanillaDude wrote: ↑Fri Feb 22, 2019 3:41 pm
The main post has a GIF example, did you realize?
I meant an example of the luna.lua, so I could pick apart the code
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sat Feb 23, 2019 9:06 am
IttaBaby wrote: ↑Sat Feb 23, 2019 8:06 am
VanillaDude wrote: ↑Fri Feb 22, 2019 3:41 pm
The main post has a GIF example, did you realize?
I meant an example of the luna.lua, so I could pick apart the code
It's all documented in the file according to the OP. Also you can't use luna.lua files until Beta4 (there's a slightly different naming scheme in Beta3). You could probably also PM the creator and ask if they could send you the code used in the GIF
|
|
|
|
|
|
|
|
|
-
TheTrueMarioMaster
- Snifit

- Posts: 200
- Joined: Mon Mar 19, 2018 11:58 pm
Postby TheTrueMarioMaster » Tue Feb 26, 2019 1:18 am
PixelPest wrote: ↑Sat Feb 23, 2019 9:06 am
IttaBaby wrote: ↑Sat Feb 23, 2019 8:06 am
VanillaDude wrote: ↑Fri Feb 22, 2019 3:41 pm
The main post has a GIF example, did you realize?
I meant an example of the luna.lua, so I could pick apart the code
It's all documented in the file according to the OP. Also you can't use luna.lua files until Beta4 (there's a slightly different naming scheme in Beta3). You could probably also PM the creator and ask if they could send you the code used in the GIF
Guess I'll have to wait until Beta 4 since this and your enemy stacking .lua could be useful to me in a future episode.
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Wed Feb 27, 2019 11:14 am
TheTrueMarioMaster wrote: ↑Tue Feb 26, 2019 1:18 am
PixelPest wrote: ↑Sat Feb 23, 2019 9:06 am
IttaBaby wrote: ↑Sat Feb 23, 2019 8:06 am
I meant an example of the luna.lua, so I could pick apart the code
It's all documented in the file according to the OP. Also you can't use luna.lua files until Beta4 (there's a slightly different naming scheme in Beta3). You could probably also PM the creator and ask if they could send you the code used in the GIF
Guess I'll have to wait until Beta 4 since this and your enemy stacking .lua could be useful to me in a future episode.
Neither of those will be in Beta4, nor will Beta4 make it easier to use either of them
|
|
|
|
|
|
|
|
|
-
TheTrueMarioMaster
- Snifit

- Posts: 200
- Joined: Mon Mar 19, 2018 11:58 pm
Postby TheTrueMarioMaster » Sat Mar 02, 2019 9:05 pm
PixelPest wrote: ↑Wed Feb 27, 2019 11:14 am
TheTrueMarioMaster wrote: ↑Tue Feb 26, 2019 1:18 am
PixelPest wrote: ↑Sat Feb 23, 2019 9:06 am
It's all documented in the file according to the OP. Also you can't use luna.lua files until Beta4 (there's a slightly different naming scheme in Beta3). You could probably also PM the creator and ask if they could send you the code used in the GIF
Guess I'll have to wait until Beta 4 since this and your enemy stacking .lua could be useful to me in a future episode.
Neither of those will be in Beta4, nor will Beta4 make it easier to use either of them
I know they are not in default Beta 4 but would setting up lua scripts be that hard in Beta 4?
|
|
|
|
|
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Sat Mar 02, 2019 9:10 pm
TheTrueMarioMaster wrote: ↑Sat Mar 02, 2019 9:05 pm
PixelPest wrote: ↑Wed Feb 27, 2019 11:14 am
TheTrueMarioMaster wrote: ↑Tue Feb 26, 2019 1:18 am
Guess I'll have to wait until Beta 4 since this and your enemy stacking .lua could be useful to me in a future episode.
Neither of those will be in Beta4, nor will Beta4 make it easier to use either of them
I know they are not in default Beta 4 but would setting up lua scripts be that hard in Beta 4?
No different than Beta3
|
|
|
|
|
|
|
|
|
-
The Dwarven Digger
- Lakitu

- Posts: 484
- Joined: Sun Oct 30, 2016 11:17 am
- Pronouns: they/them
Postby The Dwarven Digger » Sun Mar 03, 2019 8:30 am
The code used in the gif is the same as that provided in the download link. If it helps clarify things I could put some installation & use instructions in the OP.
|
|
|
|
|
Return to “LunaLua”
|