Arma 3
Call of Duty 4 - Modern Warfare [RU]
This topic has been locked
Leopard20 7 Nov, 2019 @ 8:30am
Fake transitions (fade out, fade in, etc.)
Just putting it here in case you don't find a way to fix the problem with titles:

Add this to description.ext:
#define ST_CENTER 0x02 #define CT_STATIC 0 class COD4_RscText { idc = -1; type = CT_STATIC; style = ST_CENTER; text = ""; font = "PuristaMedium"; sizeEx = "0.023 / (getResolution select 5)"; colorText[] = { 1, 1, 1, 1 }; colorBackground[] = {0,0.8,0,0}; x = 0; y = 0; w = 0; h = 0; }; class RscTitles { class COD4_EmptyScreen { idd = -1; //empty duration = 86400; fadeIn = 0; fadeOut = 0; onLoad = "uiNamespace setVariable ['COD4_BlackScreen', _this select 0]"; onUnLoad = ""; class Controls { class COD4_Message: COD4_RscText { idc = 1100; text = ""; colorBackground[] = {0,0,0,1}; x = safezoneX; y = safezoneY; w = safezoneW; h = safezoneH; sizeEx = 0.05; }; }; }; };

And use this code where you want the transition (obviously it should be spawned or execVMed, not called)
("COD4_BlackScreen" call BIS_fnc_rscLayer) cutRsc ["COD4_EmptyScreen", "PLAIN", -1 , false]; _disp = uiNamespace getVariable ["COD4_BlackScreen", displayNull]; _ctrl =_disp displayCtrl 1100; _alpha = 1; _totalTime = 3; //3 seconds, change it if you want waitUntil { _fps = diag_fps; _alpha = (_alpha - 1/_fps/_totalTime) max 0; _ctrl ctrlSetBackgroundColor [0,0,0,_alpha]; _alpha <= 0 }; ("COD4_BlackScreen" call BIS_fnc_rscLayer) cutFadeOut 0;
This is for "fade in" effect.

If you want "fade out", use this:
("COD4_BlackScreen" call BIS_fnc_rscLayer) cutRsc ["COD4_EmptyScreen", "PLAIN", -1 , false]; _disp = uiNamespace getVariable ["COD4_BlackScreen", displayNull]; _ctrl =_disp displayCtrl 1100; _alpha = 0; _totalTime = 3; //3 seconds, change it if you want waitUntil { _fps = diag_fps; _alpha = (_alpha + 1/_fps/_totalTime) min 1; _ctrl ctrlSetBackgroundColor [0,0,0,_alpha]; _alpha >= 1 }; ("COD4_BlackScreen" call BIS_fnc_rscLayer) cutFadeOut 0;
Last edited by Leopard20; 7 Nov, 2019 @ 9:17am