Quote:
Originally Posted by Crow
Try:
PHP Code:
level.tilelayers[0].alpha = 0.9;
Less for a stronger effect. Should be the correct var, not 100% sure though.
|
You'll want to reserve tile layer commands for tileset palette changes, not visual transitions. Seteffect would be more appropriate to use for this kind of thing because it darkens the screen, not the tiles.
I would recommend using a gradient image overlay on the screen layer, similar to what you've got pictured. By overlay, I mean that you need to stretch the image to the dimensions of the player's screen, and make it transparent. It shouldn't lag much at all as long as you aren't constantly re-drawing the image when you don't need to or anything like that.
Then for the actual transition itself, create a function using seteffect to fade the screen in and out as the player is warping from one level to another.
By combining a gradient image overlay with a fader, the darker shades of the gradient will fade out first, and the lighter shades will fade out last. However, you might also want to experiment by either inverting the image as well, or changing the image mode to negative as well to produce different results. If you wanted to get really fancy, you could try overlays in different shapes or forms.