Jump to content
sizraide

Fade in image from RscPicture

Recommended Posts

Is there a way to fade in a image from RscPicture? I am trying to create visual effects for a downed player/unit.

Code below:

SIZ_postProcessEffects = 
{
	params["_unit"];

	"radialBlur" ppEffectEnable true;
	"radialBlur" ppEffectAdjust [0.05,0.05,0.21,0.21];
	"radialBlur" ppEffectCommit 1;

	"ChromAberration" ppEffectEnable true;
	"ChromAberration" ppEffectAdjust [0.05,0.05,true];
	"ChromAberration" ppEffectCommit 1;

	_ctrl = findDisplay 46 ctrlCreate ["RscPicture", -1]; // Picture being created
	_ctrl ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
	_ctrl ctrlSetText selectRandom
	[
		"a3\ui_f\data\igui\rsctitles\healthtextures\blood_middle_ca.paa",
		"a3\ui_f\data\igui\rsctitles\healthtextures\blood_lower_ca.paa",
		"a3\ui_f\data\igui\rsctitles\healthtextures\blood_upper_ca.paa"
	];
	_ctrl ctrlSetFade random 0.35;
	_ctrl ctrlCommit 0;
	
	waitUntil{!alive _this || (lifeState _this == 'HEALTHY' && alive _this)};

	ctrlDelete _ctrl;
	"radialBlur" ppEffectEnable false;
	"ChromAberration" ppEffectEnable false;
};

 

Share this post


Link to post
Share on other sites

_ctrl ctrlCommit 5, instead of 0, will commit the control changes over 5 seconds. 0 is instant. Try setting it as 0 first,  then adjust fade and ctrlCommit 5.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×