Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Lewis on Thu 22/11/2012 12:44:01

Title: Region.LightLevel - When -100 isn't dark enough, where do you go?
Post by: Lewis on Thu 22/11/2012 12:44:01
Hi again, folks.

This one's really baffling me. I've set a region's light level to -100 in the script at one point, which is the lowest possible light level. But objects and characters are still entirely visible.

The effect I'm going for is that one area of the room becomes completely pitch black - the character can walk in and out of it, but you shouldn't be able to see the character when they're within this region.

I've also set up several other regions so the light level tapers in and out when you enter and exit the area - but that one area that's supposed to be pitch black still leaves the guy visible.

Any ideas on this?
Title: Re: Region.LightLevel - When -100 isn't dark enough, where do you go?
Post by: selmiak on Thu 22/11/2012 19:13:13
put a black object over the area and set the baseline to below the lowest point of the walkable area (well, just have the black object reach below the walkable area...). You can even use alpha transparency on the edges in pngs to fade the character to black.
Title: Re: Region.LightLevel - When -100 isn't dark enough, where do you go?
Post by: MurrayL on Fri 23/11/2012 17:18:15
You could also use the OnEnter and OnLeave events of the region to set character.Transparency to 100 and 0, respectively.
Title: Re: Region.LightLevel - When -100 isn't dark enough, where do you go?
Post by: Lewis on Sat 24/11/2012 09:04:19
Those are great workarounds!

Weird that -100 isn't entirely dark in the first place, but problem solved nevertheless. Cheers!