bmap hit_pan = <red.bmp>;  // fullscreen red bmp file

panel hit_panel
{
	alpha = 0;
	bmap = hit_pan;
	flags = transparent, refresh, d3d;
}

var hit_stat,0;

function _hit_flash()
{
	if(hit_stat != 0) { hit_panel.alpha = 100; end; } //if already fading out, just reset it to opaque if new hit is recieved
	hit_stat = 1;
	while(hit_panel.alpha > 0)
	{
		hit_panel.alpha -= 10 * time;
		wait(1);
	}
	hit_panel.alpha = 0;
	hit_stat = 0;
}

// hit red flash by Rhuarc
// you need a plain red image lare enough to fill the entire screen. call it red.bmp and place it in your folder
// screen flashs red when player is hit/hurt  like in FPS games