Casio91Fin 31 Posted January 21, 2021 hey. I needed help with this. i need to add these to the script, but somehow it is difficult. + an interruption in file download if the player goes far away from the laptop. + a random chance that the download failed during the download. laptop.sqf _Progress = 0; hacked = false; _unit = _this select 0; _unit removeAction 0; while {_Progress < 100} do { _Progress = _Progress + 1; hintSilent format ["Downloading... %1", _Progress]; if (_Progress >= 100) then { hacked = true; _Progress = 100; hint "Download is Complete!"; }; sleep 2.5; }; 1 Share this post Link to post Share on other sites
beno_83au 1362 Posted January 21, 2021 Just add a distance check into your condition to stop it if they wander too far away: while {(_Progress < 100) && ((_unit distance _laptop) < 5)} do //_laptop being the object the need to stay near, and must be within 5m Then at the end of the process, and before any other code, just use something like: if (_Progress >= 100) then if ((random 1) < 0.25) exitWith {hint "Download failed. Try again."}; //25% chance of failure { hacked = true; You could also use BIS_fnc_holdActionAdd to make the player hold their action button down to complete the action, but it looks like they'd have to do that for over 4 minutes which probably isn't quite what you're going for. 1 Share this post Link to post Share on other sites
Casio91Fin 31 Posted January 22, 2021 thank you @beno_83au helping. Share this post Link to post Share on other sites
Casio91Fin 31 Posted January 22, 2021 I try, but a few problems came up. 1. it stops downloading but no message.🙁 Share this post Link to post Share on other sites