nullifier.lua - Un-draw the environment

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

Moderator: Userbase Moderators

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

nullifier.lua - Un-draw the environment

Postby Emral » Sun Apr 21, 2019 8:21 am

A script I once created for someone. The idea is to have a BGO which un-draws parts of the environment.

Download:
https://pastebin.com/gsE0aQM9

Example:
In this example, the nullifier BGO is on a moving layer. On the lefthandside you can see the editor setup, while on the right they have moved a bit. Here, anything above the background until blocks is hidden.
Spoiler: show
Image
Docs (also in the file):

Code: Select all

-- set nullifier.id to the BGO ID you would like to use.
nullifier.id = 5
--call addRange to select what range of priorities you want to hide. In this example, the player is hidden
nullifier.addRange(-26, -24)

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

Re: nullifier.lua - Un-draw the environment

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

This seems interesting, i wonder what kind of stuff can you design around it.

Waddle
Tellah
Tellah
Posts: 1583
Joined: Sun Sep 07, 2014 4:59 am
Flair: hi!!!
Pronouns: He/Him

Re: nullifier.lua - Un-draw the environment

Postby Waddle » Sun Apr 21, 2019 10:35 am

We can do the SMW poison bubble shader now where it cuts through the scenery! good

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

Re: nullifier.lua - Un-draw the environment

Postby Emral » Sun Apr 21, 2019 6:46 pm

Waddle wrote:
Sun Apr 21, 2019 10:35 am
We can do the SMW poison bubble shader now where it cuts through the scenery! good
Not with nullifier! Nullifier just does squares. Circles are a bit more tricky.

MegaDood
Charged Spiny
Charged Spiny
Posts: 1831
Joined: Wed Nov 01, 2017 2:43 am

Re: nullifier.lua - Un-draw the environment

Postby MegaDood » Mon Apr 22, 2019 6:35 am

I'm a bit unsure by what this does. What do you mean exactly, by "un-draws the environment."?

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

Re: nullifier.lua - Un-draw the environment

Postby Hoeloe » Tue Apr 23, 2019 9:09 am

Enjl wrote:
Sun Apr 21, 2019 6:46 pm
Waddle wrote:
Sun Apr 21, 2019 10:35 am
We can do the SMW poison bubble shader now where it cuts through the scenery! good
Not with nullifier! Nullifier just does squares. Circles are a bit more tricky.
It could easily be adapted to use a shader that cuts out a circle. Could also take a look at Sprite.circle, since that generates UVs for circle-shaped polygons.


Return to “LunaLua”

Who is online

Users browsing this forum: DRACalgar Law and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari