Alert23 215 Posted May 17, 2019 hi everyone, hope your fine. i have a script which shows me how much Hostiles Remaining: shown on screen with HintSilent [] spawn { while {alive player} do { _totalEnemy = {alive _x && side _x == resistance} count allUnits; if (_totalEnemy > 1) then { Hintsilent format ["Hostiles Remaining: %1", _totalEnemy ]; }; }; }; however my question is, is it possible using BIS_fnc_dynamicText in the script above instead HintSilent ? i find BIS_fnc_dynamicText looks way better. Share this post Link to post Share on other sites
pierremgi 4905 Posted May 18, 2019 Sure, follow the parameters described in your first link but don't spawn the code on each loop, and choose carefully the duration... So ease your loop! I mean there is no need to "refresh" such info on each frame (especially spawning this function with its duration). So, add something "waiting" for any different count, like: [] spawn { while {alive player} do { _totalEnemy = {alive _x && side _x == resistance} count allUnits; waitUntil {uiSleep 1; ({alive _x && side _x == resistance} count allUnits) != _totalEnemy}; [format ["Hostiles Remaining: %1", _totalEnemy ],-1,-1,3,1,0,789] spawn BIS_fnc_dynamicText; uiSleep 1; }}; Now if you need a permanent display, like in wasteland, alive or else, you need to write a display. More difficult. 1 1 Share this post Link to post Share on other sites
EO 11277 Posted May 18, 2019 I prefer BIS_fnc_EXP_camp_SITREP. 1 Share this post Link to post Share on other sites
Alert23 215 Posted May 18, 2019 5 hours ago, pierremgi said: Sure, follow the parameters described in your first link but don't spawn the code on each loop, and choose carefully the duration... So ease your loop! I mean there is no need to "refresh" such info on each frame (especially spawning this function with its duration). So, add something "waiting" for any different count, like: [] spawn { while {alive player} do { _totalEnemy = {alive _x && side _x == resistance} count allUnits; waitUntil {uiSleep 1; ({alive _x && side _x == resistance} count allUnits) != _totalEnemy}; [format ["Hostiles Remaining: %1", _totalEnemy ],-1,-1,3,1,0,789] spawn BIS_fnc_dynamicText; uiSleep 1; }}; Now if you need a permanent display, like in wasteland, alive or else, you need to write a display. More difficult. WoW ! Amazing that this is even possible, THANKS. Edit: so the code will only update/shown if the totalEnemy number decreases? Share this post Link to post Share on other sites