areaNames.lua - Location headers

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

areaNames.lua - Location headers

Postby Emral » Fri Apr 19, 2019 9:21 pm

A RELIC from him name jorfrey big cat... extracted into a library!

Download:
https://pastebin.com/DWEwsMGy

Example:
Spoiler: show
Image
Docs (also inside the file):

Code: Select all

--Change this in your lua file to have automatically appearing messages on section switch for specific sections:
areaNames.sectionNames = {
	[0] = "The Beginning...",
	[5] = "The Toy Factory",
	[12] = "Thanks for playing!"
}

--Call this in your lua file to invoke the drawing manually:
areaNames.show("My Surprise Attack")

--Overwrite areaNames.draw in your lua file to create your own custom drawing function. Passes the current name and the timer, incrementing from 0:
function areaNames.draw(name, t)
	if t < 150 then
		Text.printWP(name, 20, 560, 5)
	end
end 

MmmMario
Tweeter
Tweeter
Posts: 127
Joined: Sun Aug 05, 2018 6:28 am
Flair: Yeet

Re: areaNames.lua - Location headers

Postby MmmMario » Fri Apr 19, 2019 9:50 pm

A relic...just like those Tilted Towers you mention.

Eri7
Banned
Posts: 1770
Joined: Sat Jan 28, 2017 4:48 pm
Flair: Good Foundation allows for strong Execution
Contact:

Re: areaNames.lua - Location headers

Postby Eri7 » Sun Apr 21, 2019 8:39 am

Oh boy, this is awesome, thanks Enjl!

MrCool422
Fighter Fly
Fighter Fly
Posts: 35
Joined: Sun Jan 24, 2021 12:26 am
Flair: Autistic
Pronouns: He/Him
Contact:

Re: areaNames.lua - Location headers

Postby MrCool422 » Tue Sep 21, 2021 7:18 pm

Image
was this suppose to happen?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: areaNames.lua - Location headers

Postby Emral » Wed Oct 06, 2021 2:43 am

MrCool422 wrote:
Tue Sep 21, 2021 7:18 pm
Image
was this suppose to happen?
That can only happen if you did something wrong, like forget to load the library.

MrCool422
Fighter Fly
Fighter Fly
Posts: 35
Joined: Sun Jan 24, 2021 12:26 am
Flair: Autistic
Pronouns: He/Him
Contact:

Re: areaNames.lua - Location headers

Postby MrCool422 » Tue Nov 16, 2021 5:47 pm

Enjl wrote:
Wed Oct 06, 2021 2:43 am
MrCool422 wrote:
Tue Sep 21, 2021 7:18 pm
Image
was this suppose to happen?
That can only happen if you did something wrong, like forget to load the library.
Crud! I forgot to load it!

Amine1542
Cheep-Cheep
Cheep-Cheep
Posts: 11
Joined: Thu Nov 02, 2017 8:08 pm

Re: areaNames.lua - Location headers

Postby Amine1542 » Mon Aug 08, 2022 3:34 pm

Really nice! But i don't know where to put the file and the text on the code. :(

TheTrueMarioMaster
Snifit
Snifit
Posts: 200
Joined: Mon Mar 19, 2018 11:58 pm

Re: areaNames.lua - Location headers

Postby TheTrueMarioMaster » Sat Aug 20, 2022 5:59 pm

Do you need more than just the areaNames.lua file for none of the names I typed in pop up?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari