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.