GraveYard Posted September 24 Share Posted September 24 (edited) I know a lot of people have been asking how to add auto gather, well here is a very easy way to do it. At the end of fn_gather.sqf below: sleep 1; life_action_inUse = false; Add the following: // Automatically gather again if there are resources nearby _ie585895 = -1; _zoneSizeCfg = getNumber(_resourceCfg >> "zoneSize"); if (_zone != "") then { waitUntil { if (speed player > 0)exitWith{_ie585895 = 0;true}; //moved if (life_interrupted) exitWith {_ie585895 = 1;true}; //interrupted key press if ((player distance (getMarkerPos _zone)) < _zoneSizeCfg) exitWith {_ie585895 = 2;true}; // left area true }; if (_ie585895 >= 0) exitWith{ switch _ie585895 do { case 0 : {hint "You moved so you stoped gathering"}; case 1 : {hint "Dont do anything <life_interrupted>"}; case 2 : {hint "You left the gathering area";}; }; }; [] spawn life_fnc_gather; }; At the end of fn_mine.sqf below: sleep 1; life_action_inUse = false; Add the following: // Automatically gather again if there are resources nearby _ie585895 = -1; _zoneSizeCfg = getNumber(_resourceCfg >> "zoneSize"); if (_zone != "") then { waitUntil { if (speed player > 0)exitWith{_ie585895 = 0;true}; //moved if (life_interrupted) exitWith {_ie585895 = 1;true}; //interrupted key press if ((player distance (getMarkerPos _zone)) < _zoneSizeCfg) exitWith {_ie585895 = 2;true}; // left area true }; if(_ie585895 >= 0)exitWith{ switch _ie585895 do { case 0 : {hint "Stay still <player speed>"}; case 1 : {hint "Dont do anything <life_interrupted>"}; case 2 : {hint "You left the mining area";}; }; }; [] spawn life_fnc_mine; }; Edited September 24 by GraveYard Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.