Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- params[ "_flag" ];
- _icon = "\a3\ui_f\data\igui\cfg\holdactions\holdaction_takeoff2_ca.paa";
- _duration = ["NUP_flagCapSpeed", 5] call BIS_fnc_getParamValue;
- [
- _flag,
- "Capture Post",
- _icon,
- _icon,
- "_target getVariable[ ""TER_flagSide"", sideUnknown ] != side _this",
- "true",
- //Start
- {
- },
- //Progress
- {
- params[ "_flag", "", "", "", "_progress", "_maxProgress" ];
- _relProgress = _progress/_maxProgress;
- _progress = if ( _relProgress <= 0.5 ) then {
- linearConversion[ 0, 0.5, _relProgress, 1, 0 ]
- }else{
- linearConversion[ 0.5, 1, _relProgress, 0, 1 ]
- };
- _baseMarker = _flag getVariable "NUP_baseMarker";
- [ _flag, _progress ] remoteExec [ "setFlagAnimationPhase", 0, format[ "capFlagPhase_%1", _baseMarker ] ];
- if (_progress == 0) then {
- _sideID = side player;
- _fileFlag = ["flag_csat_co", "flag_nato_co", "flag_aaf_co", "flag_fd_purple_co", "flag_white_co"] select (_sideID call BIS_fnc_sideID);
- _flag setFlagTexture format ["\a3\data_f\flags\%1.paa", _fileFlag];
- };
- },
- //Completed
- {
- params[ "_flag", "_caller" ];
- [ _flag, side _caller ] remoteExec [ "NUP_fnc_captureFlag", 2 ];
- },
- //Interrupt
- {
- params[ "_flag", "_caller" ];
- _baseMarker = _flag getVariable "NUP_baseMarker";
- [ _flag, 1 ] remoteExec [ "setFlagAnimationPhase", 0, format[ "capFlagPhase_%1", _baseMarker ] ];
- _sideID = _flag getVariable "TER_flagSide";
- _fileFlag = ["flag_csat_co", "flag_nato_co", "flag_aaf_co", "flag_fd_purple_co", "flag_white_co"] select (_sideID call BIS_fnc_sideID);
- _flag setFlagTexture format ["\a3\data_f\flags\%1.paa", _fileFlag];
- },
- [],
- _duration,
- 1.5,
- false
- ] call BIS_fnc_holdActionAdd;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement