johnnyboy 3791 Posted May 13, 2016 Here's a useful script I created for stacking objects in my new mission Property of Mabunga. In the Eden editor, stacking objects is much easier now with drag and drop and snap to grid, but this is still a time saver if you want to stack several objects neatly. To use this script, put this line of code in the init field of the object you wish to stack: dummy = [this, 3] execVM "Scripts\JBOY_StackObjects.sqf"; In your mission folder, create a script file named JBOY_StackObjects, and put this code in it: ////////////////////////////////////////////////////////// // JBOY_StackObjects.sqf // By: johnnyboy // dummy = [this, 3] execVM "Scripts\JBOY_StackObjects.sqf"; ////////////////////////////////////////////////////////// _obj = _this select 0; _objCount = _this select 1; _z = 0; _pos = getposasl _obj; _bbr = boundingBoxReal _obj; _p1 = _bbr select 0; _p2 = _bbr select 1; //_maxWidth = abs ((_p2 select 0) - (_p1 select 0)); //_maxLength = abs ((_p2 select 1) - (_p1 select 1)); _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); _height = _maxHeight+(_pos select 2); _vectorDir = vectorDir _obj; _dir = direction _obj; while {_z < _objCount} do { _z = _z + 1; _newObj = (typeOf _obj) createvehicle [0,0,0]; _newObj setDir _dir; _newObj setposasl [_pos select 0, _pos select 1, _height]; _height = _height + _maxHeight; }; Feel free to use this and modify it any way you want. 4 Share this post Link to post Share on other sites
EO 11275 Posted May 13, 2016 Thanks for sharing all these neat little scripts from your uber cool mission......Much appreciated JB. ;) 1 Share this post Link to post Share on other sites