Search the Community
Showing results for tags 'cutrsc'.
Found 4 results
-
Hide progress bar when game paused
CheyenneAH56 posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hi everybody, I will keep it simple ; I need to create and animate a progress bar, and hide unit info (displayctrl 184) when the player is in a vehicle ; BUT like any HUD display, I need the progress bar to be hidden when map is open, game is paused, etc. My problem is that the progress bar does not hide when the game is paused, or when I activate the splendid camera, etc. 🤔 The only thing I can do is hide when map is open. it's still in the development stage, I'm only testing the possibility of hiding the bar Here is my configuration and my script: CfgIGUI.hpp class WF_RscProgress { type = 8; style = 0; shadow = 2; texture = "#(argb,8,8,3)color(0.4,0.6,1.0,1.0)"; colorFrame[] = {1,1,1,1}; colorBar[] = {1,1,1,1}; colorBackground[] = {1,1,1,1}; x = 1.05; y = 0.1; w = 0.2; h = 0.025; }; class RscTitles { class Default { idd = -1; fadein = 0; fadeout = 0; duration = 0; }; class WF_Progress { name = "WF_Progress"; idd = 611983; fadein=0; duration = 99999999999; fadeout=0; movingEnable = 0; onLoad = "uiNamespace setVariable ['WF_Progress',_this select 0]"; objects[]={}; class controlsBackground { class ProgressBar : WF_RscProgress { idc = 6119831; x = 0.8055 * safezoneW + safezoneX; y = 0.07 * safezoneH + safezoneY; w = 0.28; h = 0.03; }; }; }; }; MyTestScript : _veh = _this select 0; sleep 0.01; disableSerialization; "WF_Progresslayer" cutRsc ["WF_Progress","PLAIN", -1, false]; sleep 0.01; _UnitInfoPos = ctrlPosition ((uiNameSpace getVariable "RscUnitInfo") displayCtrl 184); _WF_ProgrPos = ctrlPosition ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831); while {alive player} do { if ((player in _veh) AND (isNull (findDisplay 49))) then { ((uiNameSpace getVariable "RscUnitInfo") displayCtrl 184) ctrlSetPosition [0,0,0,0]; ((uiNameSpace getVariable "RscUnitInfo") displayCtrl 184) ctrlCommit 0; sleep 0.01; ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) ctrlSetPosition _WF_ProgrPos; ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) progressSetPosition (0.0001 max 100); ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) ctrlSetTextColor [0.4,0.6,1.0,(0.45 max 100)]; ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) ctrlCommit 0; } else { ((uiNameSpace getVariable "RscUnitInfo") displayCtrl 184) ctrlSetPosition _UnitInfoPos; ((uiNameSpace getVariable "RscUnitInfo") displayCtrl 184) ctrlCommit 0; sleep 0.01; ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) ctrlSetPosition [0,0,0,0]; ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) progressSetPosition 0; ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) ctrlSetTextColor [0,0,0,0]; ((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831) ctrlCommit 0; }; }; sleep 0.01; ctrlDelete (((uiNameSpace getVariable "WF_Progress") displayCtrl 6119831)); terminate _thisscript; Can someone help me ! Please ! 🙄-
- progress bar
- pause
-
(and 4 more)
Tagged with:
-
Hey guys. Does anyone know a way to hide the vanilla "RscTitles", say the "binocular" one (configFile >> "RscTitles" >> "binocular")? This command works with custom created cutRsc's, but not with vanilla ones (those created by the engine): cutText ["", "PLAIN"]; //OR ("binocular" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; In other words, I want to hide the binocular "HUD" (the black layers covering the display and also the "crosshair") Any help would be appreciated!
-
cutRsc and Updating Variables
complacent_lizard posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello! Last time I had an issue the BI community came to my aid, and I know how useful these forums are for everyone else, so here goes... I'm displaying a money variable for the player by using an RscTitle in the top left of the screen - that's all good. The problem is I'm not sure how to go about displaying a variable in that RscTitle that updates so that the amount of "money" the player has is displayed at all times. Here's my description.ext: class RscTitles { class CashDisplayTitle { idd = -1; duration = 1e+1000; class controls { class CashDisplayControl { idc = -1; type = 0; style = 0; x = safeZoneXAbs; y = safeZoneY - 0.45; w = 1; h = 1; font = "EtelkaNarrowMediumPro"; sizeEx = 0.05; colorBackground[] = {0,0,0,0}; colorText[] = {0,0.6,0,1}; text = "$"; }; }; }; }; So I've got 2 minor obstacles - how can I display the cashVariable in my CashDisplayControl, and how can I set up a script which updates that value? If you've got any pointers / links, I'd very much appreciate it! (I have read around, but the examples I've found are very case specific and get a little convoluted) Thanks for reading and for being an outstanding community! -
I'm having a small icon appear on a HUD for a few seconds, that instantly begins to fade. I'm using: _display ctrlSetFade 0; //On instantly _display ctrlCommit 0; _display ctrlSetFade 1; //Then fades over a short time _display ctrlCommit 1; All good. On the same HUD, to have an icon turn on or off (no fading), I'm using this in a loop: if (_cond) then { _display ctrlSetText _text; } else { _display ctrlSetText ""; }; Again, all good. So, potentially a bit of a dumb question, but I was just wondering if using ctrlSetFade's transparency to hide/unhide an element is better than using ctrlSetText to "re-link"/"de-link" the image file to achieve an on/off effect for the element?
- 3 replies
-
- cutRsc
- ctrlSetFade
-
(and 2 more)
Tagged with: