AaronZockt 0 Posted June 5, 2023 Hello there, I'm currently trying to pass the variable name of certain objects to another script, but so far I've had no success. If anyone of you has a solution, I would be very grateful :S _array = ["", "", ""]; { if (typeOf _x in _array) then { _x addAction ["Test", {[_x VARIABLE NAME] execVM "test.sqf"}]; }; } forEach (allMissionObjects ""); Share this post Link to post Share on other sites
Harzach 2505 Posted June 5, 2023 https://community.bistudio.com/wiki/vehicleVarName Share this post Link to post Share on other sites
AaronZockt 0 Posted June 5, 2023 And what would be the best way to pass the Object itself to the external Script? :S Share this post Link to post Share on other sites
Harzach 2505 Posted June 5, 2023 _array = ["RoadCone_F"]; { if (typeOf _x in _array) then { _x addAction ["Test", "test.sqf"]; }; } forEach (allMissionObjects ""); test.sqf: params ["_target", "_caller", "_actionId", "_arguments"]; _varname = vehicleVarName _target; systemChat _varName; deleteVehicle _target; Share this post Link to post Share on other sites
pierremgi 4738 Posted June 5, 2023 3 hours ago, AaronZockt said: Hello there, I'm currently trying to pass the variable name of certain objects to another script Could you elaborate? Share this post Link to post Share on other sites