I added an incremental tid to monsters on spawn starting at 22000. Then I wrote an ACS script to return the value of GetActorLightLevel based on that tid. Finally I added this to Nash's code:
Code: Select all
// lengthen shadows when it is darker
int tid = caster.tid;
float length = 0.1;
if (tid > 21999)
{
int light = ACS_NamedExecuteWithResult("GetSectorLight",tid,0,0,0);
if (light > 200) length = 0.1;
if (light > 150 && light <= 200) length = 0.2;
if (light > 100 && light <= 150) length = 0.3;
if (light > 50 && light <= 100) length = 0.4;
if (light < 50) length = 0.5;
}
https://i.postimg.cc/xdzh5Bpd/Screensho ... 172208.png
https://i.postimg.cc/Dwbx3Lrj/Screensho ... 172339.png
https://i.postimg.cc/KvC5fj6n/Screensho ... 172533.png
In these example screenshots I tried to capture zombies in lighter and darker sectors.