Hattricx 0 Posted January 18, 2019 Hi, I'm currently working on a script to create a vehicle and add it to a curator. The vehicle spawns but I cannot interact with it in zeus. Here is my script currently: This is activated by an action: _arrayObjects = getPos helipad nearEntities [["landvehicle", "air"], 7]; if (count _arrayObjects > 0) then {hint "The spawn point is blocked";} else {_veh = "rhs_uh60m" createVehicle (getpos helipad); _veh setDir 41; [_veh] remoteExec ["scripts\addVehicle.sqf", 2]; }; This is scripts\addVehicle.sqf where zeus11 is the zeus module variable name: if (isServer) then { _veh = _this select 0; zeus11 addCuratorEditableObjects [[_veh], false]; }; Thanks in advance! Share this post Link to post Share on other sites
Dedmen 2721 Posted January 18, 2019 (edited) https://community.bistudio.com/wiki/addCuratorEditableObjects Edit: Did you edit your post or do I need glasses? Edited January 18, 2019 by Dedmen Share this post Link to post Share on other sites
Mr H. 402 Posted January 18, 2019 The problem is the syntax of your remote exec. Share this post Link to post Share on other sites
Mr H. 402 Posted January 18, 2019 [[_veh],"yourscript.sqf"] remoteExec ["ExecVM",2] And BTW you shouldn't use ExecVM to call scripts like that but rather predefined functions it's way less resource consuming see here for how to: https://community.bistudio.com/wiki/Arma_3_Functions_Library Share this post Link to post Share on other sites
Hattricx 0 Posted January 18, 2019 9 hours ago, Mr H. said: [[_veh],"yourscript.sqf"] remoteExec ["ExecVM",2] And BTW you shouldn't use ExecVM to call scripts like that but rather predefined functions it's way less resource consuming see here for how to: https://community.bistudio.com/wiki/Arma_3_Functions_Library That fixed it, thanks! Would functions be beneficial if the scripts are only being called during the preparation phase of the mission or would that just be using memory for no real reason? Share this post Link to post Share on other sites
Mr H. 402 Posted January 18, 2019 Functions are always better. As a rule of thumb only execVM scripts when you use them only once. If you need suspension you can spawn a function instead of calling it. 1 Share this post Link to post Share on other sites