Page 1 of 1

nullifier.lua - Un-draw the environment

Posted: Sun Apr 21, 2019 8:21 am
by Emral
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)

Re: nullifier.lua - Un-draw the environment

Posted: Sun Apr 21, 2019 8:23 am
by Eri7
This seems interesting, i wonder what kind of stuff can you design around it.

Re: nullifier.lua - Un-draw the environment

Posted: Sun Apr 21, 2019 10:35 am
by Waddle
We can do the SMW poison bubble shader now where it cuts through the scenery! good

Re: nullifier.lua - Un-draw the environment

Posted: Sun Apr 21, 2019 6:46 pm
by Emral
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.

Re: nullifier.lua - Un-draw the environment

Posted: Mon Apr 22, 2019 6:35 am
by MegaDood
I'm a bit unsure by what this does. What do you mean exactly, by "un-draws the environment."?

Re: nullifier.lua - Un-draw the environment

Posted: Tue Apr 23, 2019 9:09 am
by Hoeloe
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.