coolfact 10 Posted September 6, 2014 I need a eventhandler there can the same things as "CuratorGroupPlaced" and "CuratorObjectPlaced" but for groups and objects which is also placed with scripts and not only curator. Have been trying to use a while loop with foreach, but having a foreach loop with allgroups and vehicles seems to be a bad idea resources wise. If anyone have an idea, it would be much appreciated. Share this post Link to post Share on other sites
benargee 20 Posted September 6, 2014 cant you just execute a command in the same script that is placing the objects and groups? I could give you an example later if you like? Share this post Link to post Share on other sites
coolfact 10 Posted September 6, 2014 This kinda destroys the purpose of having a 3rd party script, which is adding stuff to zeus Seems like a while loop is the best(?) way of adding stuff, can the following code be optimized, noticing FPS drop when having 20+ vehicles and/or groups. while {true} do { sleep 0.5; { if (_x iskindof "LandVehicle" OR _x iskindof "Air") then { _curator addCuratorEditableObjects [[_x],true]; }; } foreach vehicles; { _curator addCuratorEditableObjects [(units _x),true] }foreach allgroups; }; Share this post Link to post Share on other sites
SilentSpike 84 Posted September 6, 2014 The best way of adding stuff is most certainly in the script creating it and not in another loop. You want to avoid as many loops as possible. Share this post Link to post Share on other sites
coolfact 10 Posted September 6, 2014 yeah I guess thats true... Have to edit some scripts then :( Share this post Link to post Share on other sites