gogus12 10 Posted May 17 Hi, I've been trying to do this for a while and I can't seem to get it right. It is quite simple, it is a function that destoys a certain part of the buidlings in a array of buildings. params["_houses","_amount"]; private _number = (count _houses) * _amount; for [{private _i = 0}, {_i < _number}, {_i = _i + 1}] do { (_houses select _i) setdamage [1, false]; }; It works in SP without issues, however in multiplayer weird stuff starts happening. It will work as intended for some players, but other with see both the wrecked building and the original building, most of the time flickering. I thought it was a JIP issue, and it probably is. But I've read a lot a posts and the wiki about a dozen of times and setDamage is global, and should work with the JIP queue (as said here http://killzonekid.com/arma-scripting-tutorials-scripted-charges-v2/ at the end) And I trust bohemia with what they do, it usually works. So I guess I am missing something I could just do everything with a remoteExec[0,true] but that seems a little brutal and will generate a lot of unecessary traffic, I would rather not include that feature if that is the only solution. i could also store the buidlings somewhere and destoyThem whenever someone enters the server, it is less worse than the remoteExec but it still is a bit nasty since their is no local version of setDamage. So the question is, has anyone ever managed to do that in a "performance friendly" way? Thank you for your time :) Share this post Link to post Share on other sites
pierremgi 4751 Posted May 18 You should run this script locally for better result for all JIP, in initPlayerLocal.sqf Seems related to : https://feedback.bistudio.com/T133265 even not exactly same way. Share this post Link to post Share on other sites
gogus12 10 Posted May 18 Thanks for the answer, I'll try that Is it not going to generate a lot of traffic when a player connects since the command is global? Because essentially it is the same thing as remoteExec[0,true] Share this post Link to post Share on other sites
pierremgi 4751 Posted May 19 Test it and make a choice, or open a ticket. As a reminder: https://feedback.bistudio.com/T171471 https://feedback.bistudio.com/T70232https://feedback.bistudio.com/T133265 1 Share this post Link to post Share on other sites