Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Hinders on Sun 02/11/2003 13:48:33

Title: nedd help with light regions!
Post by: Hinders on Sun 02/11/2003 13:48:33
Is there any way to change the light regions value during the game?(with script) ???
Title: Re:nedd help with light regions!
Post by: Ytterbium on Sun 02/11/2003 14:14:48
Not that I know of. But it's easier to do with the area editor. Add a region and change its light value.
Title: Re:nedd help with light regions!
Post by: on Sun 02/11/2003 15:22:13
I'm not too familair with regions, but shouldn't you be able to create multiple regions with different light levels, and then turn them on and off accordingly?
Title: Re:nedd help with light regions!
Post by: RickJ on Sun 02/11/2003 17:14:07
I think you are looking for this ...

Quote
SetAreaLightLevel (int area, int level)

Changes region number AREA to have light level LEVEL. This does the same thing as the Light Level textbox in the editor, but allows you to change it at run-time.
Title: Re:nedd help with light regions!
Post by: Hinders on Sun 02/11/2003 20:04:00
thanks rickJ, need to change to night during the game ;)
Title: Re:nedd help with light regions!
Post by: RickJ on Sun 02/11/2003 20:09:30
In that case you may find TintScreen (..) useful as well.  It can only be used with 16bit color though.  

Title: Re:nedd help with light regions!
Post by: Hinders on Mon 03/11/2003 19:20:29
I´ll have to try them both and compare which is better.
Another question:
can you have it to fade out/in? ???
Title: Re:nedd help with light regions!
Post by: Isegrim on Mon 03/11/2003 19:36:31
maybe do a small "while" loop, where you count up or down towards the desired value...