Page 1 of 1

Need some special screen effect [SOLVED]

Posted: Wed Oct 18, 2017 4:47 pm
by Aldebaran
I have the problem that I use Invulnerable (extends Pickup) in my mod but the Nali Weapons does not change its appearance like standard weapons while it is active, so people sometimes are confused and don't know if it is on right now. So I had the idea of a special effect shown on the screen.
I saw a weapon in Unreal that colorize the hole screen slightly in a red or green color while firing with it (see screenshots). I want to use such an effect in my mod. Any ideas how I can realize this, I need a start and end routine so the hole seconds Invulnerable is active the screen slightly has another color.

Re: Need some special screen effect

Posted: Wed Oct 18, 2017 5:18 pm
by Spectra
If I understand correct, you want your whole screen to show some color until the pickup is active right?
You can take example of Unreali.Invisibility:

From Invisibility.UC:

Code: Select all

function Invisibility (bool Vis)
{
	if (Pawn(Owner)==None) Return;

	if ( Vis )
	{
		Owner.PlaySound(ActivateSound,,4.0);
		if ( PlayerPawn(Owner) != None )
			PlayerPawn(Owner).ClientAdjustGlow(-0.15, vect(156.25,156.25,351.625));
		Pawn(Owner).Visibility = 10;
		Owner.bHidden=True;
	}
	else
	{
		Owner.PlaySound(DeActivateSound);
		if ( PlayerPawn(Owner) != None )
			PlayerPawn(Owner).ClientAdjustGlow(0.15, vect(-156.25,-156.25,-351.625));
		Pawn(Owner).Visibility = Pawn(Owner).Default.Visibility;
		if ( Pawn(Owner).health > 0 )
			Owner.bHidden=False;
	}
}
The ClientAdjustGlow function is the main line you will need.
But note that, there is a setting called "ScreenFlashes" in UT.ini. If it is set to false, then this screen effect won't be seen.

Re: Need some special screen effect

Posted: Thu Oct 19, 2017 12:41 am
by Aldebaran
Thank you very much Spectra, that's what I am looking for!
I have implemented it now and it works fine. :-)
:tu: