Song name display?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
RotisserieSalad
Cheep-Cheep
Cheep-Cheep
Posts: 14
Joined: Tue Feb 06, 2024 3:57 pm
Flair: the terrible tormentor of twinks /j
Pronouns: he/him or they/them
Contact:

Song name display?

Postby RotisserieSalad » Wed Feb 28, 2024 1:48 pm

Is there a way to show a song name (which can be changed and does not pull from the file name) on level start? Potentially show another one when entering a section with different music?

Just_Thomas
Snifit
Snifit
Posts: 233
Joined: Sat Dec 16, 2023 3:32 am
Pronouns: he/him

Re: Song name display?

Postby Just_Thomas » Wed Feb 28, 2024 3:45 pm

You mean something like that?

Code: Select all

Audio.MusicTitle() 	string title 	Returns the music title from metadata (if empty, filename will be returned)
Audio.MusicTitleTag() 	string titleTag 	Returns the title tag from metadata (if empty, returns an empty string)
Audio.MusicArtistTag() 	string artistTag 	Returns the artist tag from metadata (if empty, returns an empty string)
Audio.MusicAlbumTag() 	string albumTag 	Returns the album tag from metadata (if empty, returns an empty string)
Audio.MusicCopyrightTag() 	string copyrightTag 	Returns the copyright tag from metadata (if empty, returns an empty string)
Luna Lua Events

Code: Select all

onStart()
Runs at the start of the game, after all libraries have been loaded. This is the first point in time when entities like players, NPCs and blocks are loaded in.
onLoadSection(number playerIdx)
Runs when any section is loaded. Just like onLoopSection, this function will be called once per player. Prefer onSectionChange.
onLoadSection#(number playerIdx)
Runs when section # (where # is a number between 0 and 20) is loaded. Just like onLoopSection, this function will be called once per player. Prefer onSectionChange.
Text Class

Plz don`t ask me for details, for the most time I am quite helpless on my own *caught*

RotisserieSalad
Cheep-Cheep
Cheep-Cheep
Posts: 14
Joined: Tue Feb 06, 2024 3:57 pm
Flair: the terrible tormentor of twinks /j
Pronouns: he/him or they/them
Contact:

Re: Song name display?

Postby RotisserieSalad » Wed Feb 28, 2024 9:10 pm

Just_Thomas wrote:
Wed Feb 28, 2024 3:45 pm
You mean something like that?

Code: Select all

Audio.MusicTitle() 	string title 	Returns the music title from metadata (if empty, filename will be returned)
Audio.MusicTitleTag() 	string titleTag 	Returns the title tag from metadata (if empty, returns an empty string)
Audio.MusicArtistTag() 	string artistTag 	Returns the artist tag from metadata (if empty, returns an empty string)
Audio.MusicAlbumTag() 	string albumTag 	Returns the album tag from metadata (if empty, returns an empty string)
Audio.MusicCopyrightTag() 	string copyrightTag 	Returns the copyright tag from metadata (if empty, returns an empty string)
Luna Lua Events

Code: Select all

onStart()
Runs at the start of the game, after all libraries have been loaded. This is the first point in time when entities like players, NPCs and blocks are loaded in.
onLoadSection(number playerIdx)
Runs when any section is loaded. Just like onLoopSection, this function will be called once per player. Prefer onSectionChange.
onLoadSection#(number playerIdx)
Runs when section # (where # is a number between 0 and 20) is loaded. Just like onLoopSection, this function will be called once per player. Prefer onSectionChange.
Text Class

Plz don`t ask me for details, for the most time I am quite helpless on my own *caught*
I'll see what I can do with this stuff, thank you!


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 6 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari