Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TheMagician on Sun 03/08/2003 22:08:28

Title: Possible BUG? SetRegionTint
Post by: TheMagician on Sun 03/08/2003 22:08:28
Hi,

I just played with the new SetRegionTint function. If I call

SetRegionTint(4,30,50,70,0);

isn't it supposed to tint the region the same way as if I would set the values of Region Color Tint in the Room Editor to 30, 50 and 70?

However, if I set the region tint for region 4 in the room editor to 30,30,30 and after 5 seconds in the game do SetRegionTint(4,30,30,30,0) nothing should change. But it does change to a turquoise color (and it always changes to that same color whatever RGB values I pass in the function.)

Any ideas?
Title: Re:Possible BUG? SetRegionTint
Post by: Pumaman on Sun 03/08/2003 22:42:03
Hmm you're right, the blue component isn't being set properly. I'll get it fixed.
Title: Re:Possible BUG? SetRegionTint
Post by: TheMagician on Mon 04/08/2003 11:56:52
Another thing with Region Tint and Lightning:

I want to make a region that changes from RGB Tint (0,0,100) (which I set in the room editor) to 30 percent lighting. However, if I use the SetAreaLightLevel - function (is it called like that?) the region lighting always gets set to 100 percent whatever values I pass in the function.

Can you have a look at that too, CJ?

Thanks in advance
Stefan
Title: Re:Possible BUG? SetRegionTint
Post by: Pumaman on Mon 04/08/2003 21:09:03
I gave it a quick test and it seemed fine.

Remember that SetAreaLightLevel's parameter is -100 to +100, rather than the 0-200 you get in the editor, so you have to subtract 100 from the equivalent editor value. (ie 30% light is -70).
Title: Re:Possible BUG? SetRegionTint
Post by: TheMagician on Mon 04/08/2003 23:19:30
I am sorry! I didn't realise the -100 to +100 thing.

It works ok for me, too.