bardosy 158 Posted April 30, 2016 I have a script (sqf) what create a vehicle. This script has a parameter, the name of the vehicle. I want name this vehicle after I create it. In Arma2 I could use this: _plane = createVehicle ["CUP_O_BMP3_RU", _spawnpos, [], 0, "NONE"]; _plane setDir _dir; _plane setVehicleInit format["%1 = this",_planename]; processInitCommands; Where the name of the vehicle is _planename. But in Arma3 there is no setVehicleInit and processInitCommands. How could I name this newly created vehicle? Naming it directly like bmp1=_plane, is not an option, because I will call this script many times with different vehicle names. And yes, I know I could use this, but it's very ugly: if (_planename="bmp1") then { bmp1 = _plane; }; if (_planename="bmp2") then { bmp2 = _plane; }; if (_planename="bmp3") then { bmp3 = _plane; }; if (_planename="bmp4") then { bmp4 = _plane; }; ...etc Share this post Link to post Share on other sites
Sniperwolf572 758 Posted April 30, 2016 missionNamespace setVariable [_planeName, _plane]; 2 Share this post Link to post Share on other sites