Region tints

Started by FortressCaulfield, Tue 28/05/2024 21:37:37

Previous topic - Next topic

FortressCaulfield

I've got a scene in a high rise with hovertraffic in the distance. I used a region with tint to color the background traffic sprites when they go behind the greenish window and it works great... except it only works once the sprite is ENTIRELY inside the region. If it's partly overlapping, no tint. This is a problem since my plan had been to only have a few "objects" worth of traffic, each comprising many vehicles.

Is there a way to get region tint to apply only to the part of a sprite inside the region, or is there another way to do what I'm trying to do? Or do I just need to shut up and break my traffic sprites into multiple smaller sprites of one vehicle each?
"I can hear you! My ears do more than excrete toxic mucus, you know!"

-Hall of Heroes Docent, Accrual Twist of Fate

Crimson Wizard

#1
One problem in AGS is that objects interact with regions only by a single point, their "origin", which is left-bottom corner for Room Objects and middle-bottom point for Characters. Thus an object is considered to be "on region" only if this point is on region.
This works more or less for characters (since their origin is at their horizontal center", but not much for objects.

But then, there's also no default way to apply a tint only to a part of the sprite; the tint and lighting levels are applied always to the whole sprite.

The solution in your case, possibly, could be to not use a region tint, but instead create a translucent greenish object where you want this effect be, and make sure its Baseline is set so the cars are behind.
Translucency is achieved by setting Transparency property.
https://adventuregamestudio.github.io/ags-manual/Object.html#objecttransparency

SMF spam blocked by CleanTalk