kibaBG 53 Posted August 25, 2022 Hi everyone, I need little help with spawning defender/garrison/static units into my mission. My question is if this is the right way to do this? What I do is open new mission on the same map as my main mission, carefully and precisely place all defender units (units that will stay on one position) save and export to SQF. I paste the code in "someTown.sqf" and then use this to spawn it in the main mission: ["someTown.sqf", "BIS_fnc_execVM", false, false] call BIS_fnc_MP; Probably there is more up to date and efficient way to do this via remoteExec but I cannot understand how to do it ... please help. Coding every static gun or defender position and heading is much slower and consumes much more time ... Share this post Link to post Share on other sites
Harzach 2517 Posted August 25, 2022 remoteExec syntax: Quote params remoteExec [order, targets, JIP] So, we want to remoteExec the function BIS_fnc_execVM with your script being the param, and following the BIS_fnc_MP example, we'll execute it on the server only and not for JIP (which is false by default, so no need to define it): ["someTown.sqf"] remoteExec ["BIS_fnc_execVM", 2]; Now, whether or not that's correct for an .sqf exported from the editor, I can't say, but it should be...? 3 Share this post Link to post Share on other sites
kibaBG 53 Posted August 25, 2022 Thank you @Harzach, I will try it and report back. I will try it in "real" MP with some friends. If enemies are not x4 more than they should be everything is fine. 😃 But main question remains ... is this the correct way to spawn units previously exported to SQF? Share this post Link to post Share on other sites
Harzach 2517 Posted August 25, 2022 34 minutes ago, kibaBG said: But main question remains Well, the exported .sqf uses createVehicle which is GE, and since we are executing it on the server only, it should work as desired. Let us know! 1 1 Share this post Link to post Share on other sites
kibaBG 53 Posted September 1, 2022 UPDATE: After heavy tested in MP (local host) this code: ["someTown.sqf"] remoteExec ["BIS_fnc_execVM", 2]; I can say it's doing the job spawning units, vehicles, static weapons and mines previously exported to SQF without any problems. Thanks @Harzach ! 1 Share this post Link to post Share on other sites
Harzach 2517 Posted September 1, 2022 Cool, glad it's sorted for you! 1 Share this post Link to post Share on other sites