How to make a whole screen red flash.
Hi, Can anyone tell me how to make the whole screen on my game flash red for like half a second when you loose a life.
Best Answers
-
RacetotheMoon Posts: 323
You're going to want to place a sprite in your scene that's the entire size of the screen. It's going to be the top most layer so that when it's called it covers everything. By default, your object should have an Alpha Value of 0 (zero).
When your event happens, call a boolean attribute to be TRUE, call it something along the lines of 'gameScreenFlash_Red'. When this event calls, change your sprite to have an alpha value of 1 (or, if you want to fade it in, interpolate it to 1 over the course some time).
From here, there's a number of things you can do. I suggest having an event that says once 'gameScreenFlash_Red' is TRUE, X seconds later, (which is your time variable) Interpolate your red sprite that's covering the screen back down to Zero. You could also just change the variable to 1 to make it happen instantly. Make sure you reset your variable that triggers the 'gameScreenFlash_Red' at the same time too.
Let me know if you have any questions. -
jamie_c ImagineLabs.rocks Posts: 5,772
Hi Sparx13,
There is a tutorial and sample files for full screen effects here:
http://www.jamie-cross.net/?p=585
Let me know if that helps.
Jamie
Answers
Thanks in advance.