Share and discuss custom LunaLua code and content packs for SMBX2.
Moderator: Userbase Moderators
|
|
|
|
-
KurttheKing
- Monty Mole

- Posts: 131
- Joined: Tue Mar 15, 2022 4:55 pm
- Flair: Certified Nerd
- Pronouns: He/Him
-
Contact:
Postby KurttheKing » Mon Jul 11, 2022 6:16 pm
MrDoubleA wrote: ↑Mon Jul 11, 2022 5:42 pm
KurttheKing98 wrote: ↑Sun Jul 10, 2022 6:31 pm
I have a quick question. So, it seems as if the Little Dialogue Folder/Script has to be in the Episode Folder, and not simply the Level Folder. I'm probably just doing something wrong (because I'm still terrible at scripting) but if you know how to make it work by having the LD Folder and Script in the Level Folder, let me know. Thanks!
I've tested it in both the episode and level folder. Sharing any error/debug messages you get, as well as your luna.lua file, would be very useful.
Here's the Error Message I get when trying to enter a level with it in the level folder (I also wrote local littleDialogue = require("littleDialogue") inside my level's Lunalua File) :
Any ideas? 
|
|
|
|
|
|
|
|
|
-
KurttheKing
- Monty Mole

- Posts: 131
- Joined: Tue Mar 15, 2022 4:55 pm
- Flair: Certified Nerd
- Pronouns: He/Him
-
Contact:
Postby KurttheKing » Tue Jul 12, 2022 7:51 pm
KurttheKing98YT wrote: ↑Mon Jul 11, 2022 6:16 pm
MrDoubleA wrote: ↑Mon Jul 11, 2022 5:42 pm
KurttheKing98 wrote: ↑Sun Jul 10, 2022 6:31 pm
I have a quick question. So, it seems as if the Little Dialogue Folder/Script has to be in the Episode Folder, and not simply the Level Folder. I'm probably just doing something wrong (because I'm still terrible at scripting) but if you know how to make it work by having the LD Folder and Script in the Level Folder, let me know. Thanks!
I've tested it in both the episode and level folder. Sharing any error/debug messages you get, as well as your luna.lua file, would be very useful.
Here's the Error Message I get when trying to enter a level with it in the level folder (I also wrote local littleDialogue = require("littleDialogue") inside my level's Lunalua File) :
Any ideas?
OK so I'm not sure exactly what the problem was, but upon copying the exact script and folder from the Example Level and using that instead, it just decided to work for some reason XD
I'm gonna go figure out what I did differently. Cya!
|
|
|
|
|
|
|
|
|
-
FLOOFYBULL
- Cheep-Cheep

- Posts: 13
- Joined: Thu Apr 22, 2021 5:12 pm
- Pronouns: he
Postby FLOOFYBULL » Sat Jul 16, 2022 4:10 pm
Good stuff (As always)! But how do you change the text box that comes from events?
|
|
|
|
|
|
|
|
|
-
deice
- Volcano Lotus

- Posts: 596
- Joined: Fri Jul 23, 2021 7:35 am
Postby deice » Sat Jul 16, 2022 4:23 pm
FLOOFYBULL wrote: ↑Sat Jul 16, 2022 4:10 pm
Good stuff (As always)! But how do you change the text box that comes from events?
default settings are near the bottom of the library file
|
|
|
|
|
|
|
|
|
-
BroccoliRampage
- Fighter Fly

- Posts: 49
- Joined: Fri Jan 31, 2020 7:39 pm
- Flair: Moop!
Postby BroccoliRampage » Sun Oct 16, 2022 12:50 am
Any idea why the <page> tag won't work with this and is there an alternative tag that could possibly be used instead?
|
|
|
|
|
|
|
|
|
-
MrDoubleA
- Flurry

- Posts: 394
- Joined: Mon Aug 20, 2018 7:02 am
- Flair: How much munchers?
Postby MrDoubleA » Wed Oct 26, 2022 4:06 pm
BroccoliRampage wrote: ↑Sun Oct 16, 2022 12:50 am
Any idea why the <page> tag won't work with this and is there an alternative tag that could possibly be used instead?
It seems to work for everyone else, so it'd be appreciated if you could share what you're doing.
|
|
|
|
|
|
|
|
|
-
1Sonichedgehog
- Goomba

- Posts: 1
- Joined: Fri Dec 30, 2022 1:54 pm
- Pronouns: he/him
Postby 1Sonichedgehog » Fri Dec 30, 2022 2:16 pm
Hello guys! so I've been using littledialogue for a while and its great! but i wanted to do something different, is it possible to add a question.... in a question?... let me explain, so usually in littleDialogue a question is there to end off a sentence but i want it to keep on going! like after the player clicks the question and the text plays instead of ending another question comes and a so on.
|
|
|
|
|
|
|
|
|
-
Lunar Chris
- Monty Mole

- Posts: 134
- Joined: Mon Jan 06, 2014 9:51 pm
- Flair: Moon Lord's Servant
-
Contact:
Postby Lunar Chris » Wed Jan 25, 2023 2:05 pm
If you ever plan on updating this script, might I throw you some ideas to make it more flexible.
PRONOUNS: This would compliment <characterNames> very well, especially when there are creators trying to make story driven episodes. It could work similarly to charnames where each pronoun is designated to each specific character. Not to mention, this can also be customized for if you have custom characters for your episode (assuming it's possible to do within littledialogue's code).
HIDE HUD: Pretty simple, a feature that hides the hud by either fading it out, sliding it upwards offscreen, or simply make it invisible instantly upon talking to an NPC. The HUD only comes back after the dialogue is finished.
|
|
|
|
|
|
|
|
|
-
ditditdit
- Dolphin

- Posts: 92
- Joined: Sun Jan 02, 2022 4:25 pm
- Flair: e
- Pronouns: she/they
-
Contact:
Postby ditditdit » Mon Mar 27, 2023 5:34 pm
Code: Select all c = 5
function count()
Text.print("it worked", 0, 0)
if c > 1 then
c = c - 1
Text.print("it worked", 0, 0)
triggerEvent("bitcoin loop")
else
triggerEvent("kaboom")
end
end
-- Run code every frame (~1/65 second)
-- (code will be executed before game logic will be processed)
function onTick()
--Your code here
end
-- Run code when internal event of the SMBX Engine has been triggered
-- eventName - name of triggered event
function onEvent(eventName)
--Your code here
end
-- oof
littleDialogue.registerAnswer("playerchoice",{text = "do nothing",addText = "<characterName> did absolutely nothing!<page><speakerName luigi> I Have taught you well, young jedi.", chosenFunction = count()})
littleDialogue.registerAnswer("playerchoice",{text = "attack",addText = "<characterName> Used attack!", chosenFunction = count()})
so im programming an RPG battle for my collab, (ignore the weirdness). but for somw reason, count() won't activate! any idea whats going on?
|
|
|
|
|
|
|
|
|
-
MrDoubleA
- Flurry

- Posts: 394
- Joined: Mon Aug 20, 2018 7:02 am
- Flair: How much munchers?
Postby MrDoubleA » Thu Mar 30, 2023 4:15 pm
ditditdit wrote: ↑Mon Mar 27, 2023 5:34 pm
Code: Select all c = 5
function count()
Text.print("it worked", 0, 0)
if c > 1 then
c = c - 1
Text.print("it worked", 0, 0)
triggerEvent("bitcoin loop")
else
triggerEvent("kaboom")
end
end
-- Run code every frame (~1/65 second)
-- (code will be executed before game logic will be processed)
function onTick()
--Your code here
end
-- Run code when internal event of the SMBX Engine has been triggered
-- eventName - name of triggered event
function onEvent(eventName)
--Your code here
end
-- oof
littleDialogue.registerAnswer("playerchoice",{text = "do nothing",addText = "<characterName> did absolutely nothing!<page><speakerName luigi> I Have taught you well, young jedi.", chosenFunction = count()})
littleDialogue.registerAnswer("playerchoice",{text = "attack",addText = "<characterName> Used attack!", chosenFunction = count()})
so im programming an RPG battle for my collab, (ignore the weirdness). but for somw reason, count() won't activate! any idea whats going on?
This doesn't really have much to do with littleDialogue, so it'd fit better in Lunalua Help, but anwyay:
Doing "chosenFunction = count()" does NOT set chosenFunction to be "count". Instead, it RUNS count, and then sets chosenFunction to be the result of that. Instead, you should be doing "chosenFunction = count".
|
|
|
|
|
|
|
|
|
-
cold soup
- Bit

- Posts: 73
- Joined: Wed May 13, 2020 8:29 pm
- Flair: yeah
- Pronouns: they/she
-
Contact:
Postby cold soup » Wed Apr 12, 2023 11:50 pm
got this error when activating a message with a playerKey argument. only happens when the specified key is a directional key (up, down, left, right), and the error only occurs when i'm using a controller.

here's the message for reference:

|
|
|
|
|
|
|
|
|
-
MrDoubleA
- Flurry

- Posts: 394
- Joined: Mon Aug 20, 2018 7:02 am
- Flair: How much munchers?
Postby MrDoubleA » Thu Apr 13, 2023 12:05 pm
cold soup wrote: ↑Wed Apr 12, 2023 11:50 pm
got this error when activating a message with a playerKey argument. only happens when the specified key is a directional key (up, down, left, right), and the error only occurs when i'm using a controller.

here's the message for reference:
I really ought to release a proper update at some point. In any case, replacing the lua file with this file should fix it.
|
|
|
|
|
|
|
|
|
-
ANueUtsuho
- Swooper

- Posts: 51
- Joined: Sun May 04, 2014 1:13 am
Postby ANueUtsuho » Fri Jun 16, 2023 3:27 am
Just a question: can is it possible for me to add more dialogue colors? Like, an indigo, for example? I'm looking all over littleDialouge.lua and I can't seem to find where to do that.
|
|
|
|
|
|
|
|
|
-
MrDoubleA
- Flurry

- Posts: 394
- Joined: Mon Aug 20, 2018 7:02 am
- Flair: How much munchers?
Postby MrDoubleA » Sun Jun 18, 2023 11:24 am
ANueUtsuho wrote: ↑Fri Jun 16, 2023 3:27 am
Just a question: can is it possible for me to add more dialogue colors? Like, an indigo, for example? I'm looking all over littleDialouge.lua and I can't seem to find where to do that.
You can use hex codes. For instance: Code: Select all This text is <color #FF0000>red</color>.
|
|
|
|
|
|
|
|
|
-
ANueUtsuho
- Swooper

- Posts: 51
- Joined: Sun May 04, 2014 1:13 am
Postby ANueUtsuho » Sun Jun 18, 2023 2:10 pm
MrDoubleA wrote: ↑Sun Jun 18, 2023 11:24 am
ANueUtsuho wrote: ↑Fri Jun 16, 2023 3:27 am
Just a question: can is it possible for me to add more dialogue colors? Like, an indigo, for example? I'm looking all over littleDialouge.lua and I can't seem to find where to do that.
You can use hex codes. For instance: Code: Select all This text is <color #FF0000>red</color>.
Thank you!
|
|
|
|
|
|
|
|
|
-
Enzo
- Banned
- Posts: 11
- Joined: Wed Sep 22, 2021 2:24 pm
- Flair: ever wondered how babies were born?
- Pronouns: He
Postby Enzo » Mon Jul 03, 2023 5:01 am
So, I don't know what to do anymore, but littleDialouge is making bigDiscussions.
So, when I put the script in a level folder, it doesn't work. But the error message doesn't pop up; the script literally doesn't activate.
So I put the script in the episode's folder, and still doesn't activate. I don't know anymore and even seeing these threads up mine don't help either.
If MrDoubleA sees this, please just tell me what to do.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9860
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Mon Jul 03, 2023 6:32 am
did you load the script in your luna.lua file with require("littledialogue")?
check the example level's luna.lua for reference.
|
|
|
|
|
|
|
|
|
-
Enzo
- Banned
- Posts: 11
- Joined: Wed Sep 22, 2021 2:24 pm
- Flair: ever wondered how babies were born?
- Pronouns: He
Postby Enzo » Mon Jul 03, 2023 7:27 am
Emral wrote: ↑Mon Jul 03, 2023 6:32 am
did you load the script in your luna.lua file with require("littledialogue")?
check the example level's luna.lua for reference.
It's not doing anything. I'm also copying the exact luna.lua file from the level example, but still nothing.
The strange part of all of this is that the "require("littledialouge")" thing is not written on the script of the level.
So I still don't know what's the problem with this son of a gun.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9860
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Mon Jul 03, 2023 7:36 am
AntonioTopino wrote: ↑Mon Jul 03, 2023 7:27 am
Emral wrote: ↑Mon Jul 03, 2023 6:32 am
did you load the script in your luna.lua file with require("littledialogue")?
check the example level's luna.lua for reference.
It's not doing anything. I'm also copying the exact luna.lua file from the level example, but still nothing.
The strange part of all of this is that the "require("littledialouge")" thing is not written on the script of the level.
So I still don't know what's the problem with this son of a gun.
Can you upload a zip of your setup? Then I can take a look.
|
|
|
|
|
|
|
|
|
-
Enzo
- Banned
- Posts: 11
- Joined: Wed Sep 22, 2021 2:24 pm
- Flair: ever wondered how babies were born?
- Pronouns: He
Postby Enzo » Mon Jul 03, 2023 8:00 am
Emral wrote: ↑Mon Jul 03, 2023 7:36 am
AntonioTopino wrote: ↑Mon Jul 03, 2023 7:27 am
Emral wrote: ↑Mon Jul 03, 2023 6:32 am
did you load the script in your luna.lua file with require("littledialogue")?
check the example level's luna.lua for reference.
It's not doing anything. I'm also copying the exact luna.lua file from the level example, but still nothing.
The strange part of all of this is that the "require("littledialouge")" thing is not written on the script of the level.
So I still don't know what's the problem with this son of a gun.
Can you upload a zip of your setup? Then I can take a look.
You mean the episode or the actual luna.lua file?
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 3 guests
|