foreShadows.lua - I see you back there!

Share and discuss custom LunaLua code and content packs for SMBX2.
MrDoubleA
Flurry
Flurry
Posts: 385
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

foreShadows.lua - I see you back there!

Postby MrDoubleA » Sat Mar 25, 2023 11:20 am

Something I whipped up in a few minutes. Shows where players/NPCs/etc. are behind foreground objects.
Similar to dropShadows.lua, should work with pretty much everything, but partial transparency may cause issues.

Image

Download

Alucard648
Monty Mole
Monty Mole
Posts: 131
Joined: Sun Aug 16, 2015 3:45 am

Re: foreShadows.lua - I see you back there!

Postby Alucard648 » Sat Mar 25, 2023 12:39 pm

Will it be possible to limit functionality of this script to specific BGOs and after triggering specific events?
https://youtu.be/F1GDvDX6y3g?t=3831

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

Re: foreShadows.lua - I see you back there!

Postby Emral » Sat Mar 25, 2023 9:23 pm

Alucard648 wrote:
Sat Mar 25, 2023 12:39 pm
Will it be possible to limit functionality of this script to specific BGOs and after triggering specific events?
https://youtu.be/F1GDvDX6y3g?t=3831
It already is. You just have to change BGO.config[id].priority at runtime, or swap a layer with BGOs on one priority to BGOs of another. All it does is compare priorities.

Code: Select all

-- Priority where sprites will start having a "shadow".
foreShadows.backPriority = -59
-- Priority where sprites stop having a "shadow".
foreShadows.middlePriority = -21
-- Priority where sprites will stop causing sprites to have a "shadow".
foreShadows.forePriority = -16
This means that any BGO with a priority between -21 and -16 will cause sprites to have a shadow. So a BGO with priority -15.5 would not.

Alucard648
Monty Mole
Monty Mole
Posts: 131
Joined: Sun Aug 16, 2015 3:45 am

Re: foreShadows.lua - I see you back there!

Postby Alucard648 » Sun Mar 26, 2023 9:27 am

Thanks.

blockhopper gaming
Goomba
Goomba
Posts: 1
Joined: Thu Feb 29, 2024 5:37 pm

Re: foreShadows.lua - I see you back there!

Postby blockhopper gaming » Thu Feb 29, 2024 5:49 pm

The link for this is dead (thanks Discord), could someone provide a backup?

MrDoubleA
Flurry
Flurry
Posts: 385
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

Re: foreShadows.lua - I see you back there!

Postby MrDoubleA » Sat Mar 02, 2024 9:32 am

blockhopper gaming wrote:
Thu Feb 29, 2024 5:49 pm
The link for this is dead (thanks Discord), could someone provide a backup?
Fixed now.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari