Creating darkness in a certain section?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

LunarCatUSA
Monty Mole
Monty Mole
Posts: 115
Joined: Sat Mar 06, 2021 9:56 am
Flair: Soda-Butler

Creating darkness in a certain section?

Postby LunarCatUSA » Mon Sep 27, 2021 1:11 am

Say I wanted to make an entire section pitch black. How would I got about this in terms of LunaLua code? I know it’s something among the the lines of sectiondarkness or some function like that. I’d appreciate any help.

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Creating darkness in a certain section?

Postby Hoeloe » Mon Sep 27, 2021 6:49 am

That doesn't need any Lua code at all. You can just enable it in the section settings.

LunarCatUSA
Monty Mole
Monty Mole
Posts: 115
Joined: Sat Mar 06, 2021 9:56 am
Flair: Soda-Butler

Re: Creating darkness in a certain section?

Postby LunarCatUSA » Mon Sep 27, 2021 5:42 pm

I mean at like a certain point. Like make it go out during an event? Let’s say I want the screen lit up one second, then dark the next.

deice
Rocky Wrench
Rocky Wrench
Posts: 638
Joined: Fri Jul 23, 2021 7:35 am

Re: Creating darkness in a certain section?

Postby deice » Tue Sep 28, 2021 8:03 am

you can use the automatically loaded darkness.lua library as explained here. there's also a video tutorial by enjl

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Creating darkness in a certain section?

Postby Hoeloe » Tue Sep 28, 2021 10:02 am

You don't need to do either of those. It's a lot simpler. You can just do Section(0).darkness.enabled = false.

LunarCatUSA
Monty Mole
Monty Mole
Posts: 115
Joined: Sat Mar 06, 2021 9:56 am
Flair: Soda-Butler

Re: Creating darkness in a certain section?

Postby LunarCatUSA » Wed Sep 29, 2021 1:15 am

Alright, thanks.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 6 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari