Search the Community
Showing results for tags 'bar'.
Found 2 results
-
Hello, i have a problem in inserting my progress bar in my code made for capturing a zone. The problem is that only players inside the list of the trigger need to see the progress bar and for that i used the remoteExec command. But when testing on server the code crash. But it works fine in the editor. I have put some //// where commands from the progress bar are. The variable barLayer = [1,2,3,4]; I have this : private ["_sideunits", "_sidegroup", "_trgCapture", "_trgBlock", "_sideBlock"]; _done = false; _resMarker = _this select 4; _posMarker = getPos (_this select 5); _tower = _this select 5; _resGroup = _this select 6; _attackMarker = _this select 7; _towerStatus = _tower getVariable "side"; //////////////////////////////// _layer = barLayer select 0; barLayer = barLayer - [_layer]; /////////////////////////////// if (_this select 0 == east) then { _sideunits = side_east; _sidegroup = east; _sideBlock = independent; _trgBlock = _this select 1; _trgCapture = _this select 2; }; if (_this select 0 == independent) then { _sideunits = side_independent; _sidegroup = independent; _sideBlock = east; _trgBlock = _this select 2; _trgCapture = _this select 1; }; if (_tower getVariable "side" == _sidegroup) exitWith {}; disableSerialization; //// _timer = [_trgCapture, _trgBlock, _layer] spawn { private "_txt"; _trg = _this select 0; _trgB = _this select 1; _layer = _this select 2; //// _cp = time_capture; /////////////////////////////////////////////////////////////////// [_layer,["myProgressBar","PLAIN"]] remoteExec ["cutRsc", list _trg]; waitUntil {!isNull (uiNameSPace getVariable "myProgressBar")}; _display = uiNameSpace getVariable "myProgressBar"; _bar = _display displayCtrl 2; _cpBar = 0; _barTime = 1/time_capture; /////////////////////////////////////////////////////////////////// while {_cp > 1} do { if (!triggerActivated _trgB) then { _txt = format ["Captured in %1 sec", _cp]; _cp = _cp - 1; //// _cpBar = _cpBar + _barTime; _bar progressSetPosition _cpBar; //// } else { _txt = format ["Captured in %1 sec\n\nBLOCKED !", _cp]; [["ATTACKED !", "PLAIN DOWN"]] remoteExec ["cutText", list _trgB]; }; [[_txt, "PLAIN DOWN"]] remoteExec ["cutText", list _trg]; sleep 1; }; [_layer,["default","PLAIN"]] remoteExec ["cutRsc", list _trg]; //// barLayer pushBack _layer; }; if (_tower getVariable "side" == _sideBlock) then { deleteMarker _resMarker; _attackMarker setMarkerAlpha 1; [_sideblock, _tower] call msg_attack; }; while {triggerActivated _trgCapture and !_done} do { if (scriptDone _timer and !triggerActivated _trgBlock) then { _tower setvariable ["side", _sidegroup]; [] spawn fn_spawnMission; [_sidegroup, _towerStatus] call countCapture; [_sideunits, _sidegroup] execVM (_this select 3); [_sidegroup, _tower, _sideunits] execVM "ai\ai_upgrade.sqf"; _done = true; }; }; if (!triggerActivated _trgCapture) then { ///////////////////////////////// _layer cutRsc ["default","PLAIN"]; barLayer pushBack _layer; //////////////////////////////// */ terminate _timer; if (_tower getVariable "side" == _sideBlock) then { createMarker [_resMarker, _posMarker]; _resMarker setMarkerShape "ICON"; _resMarker setMarkerType "hd_dot"; _resMarker setMarkerAlpha 0; _attackMarker setMarkerAlpha 0; }; };
- 9 replies
-
- remoteexec
- progress
-
(and 1 more)
Tagged with:
-
Why is there two bars in the loading screen in Arma 3 (one small and one long). Is one loading the world and the other the scenario files ? And why does they each have to fill twice ?