TheGeneral2899 19 Posted May 20, 2017 Seems to have gotten me stuck after an hour or so of searching. 1) Array of 10 unit names 2) Use Bis_fnc_selectRandom from them to choose one random of them. 3) *ISSUE* I want to create a new array of the remaining 9 units (minus the one that was random). // Array of all possible locations (items are pens for placement reasons) _potentialLoc = [bomb1,bomb2,bomb3,bomb4,bomb5,bomb6,bomb7,bomb8,bomb9,bomb10]; // selects randomized location for bomb _bombRandom = _potentialLoc call BIS_fnc_selectRandom; // gets position of randomly selected bomb _bombLoc = getPosATL _bombRandom; //Creates the bomb box and then the detonante script bombActual = createVehicle ["CUP_ammobednaX", _bombLoc, [], 0, "CAN_COLLIDE"]; _disarmBomb = [bombActual] execVM "detonate.sqf"; // Create new array of remaining false bomb locations // HERE IS MY ISSUE _fakeBombLoc = _potentialLoc - _bombRandom; sleep 3; hint str _fakeBombLoc; // [1,2,3] When attempting to print it out, I still get the full list of 10 bomb locations despite. Any help would be greatly appreciated! Thanks! Share this post Link to post Share on other sites
TheGeneral2899 19 Posted May 20, 2017 Figured out the issue. Previous code: _fakeBombLoc = _potentialLoc - _bombRandom; Fixed code: _fakeBombLoc = _potentialLoc - [_bombRandom]; Share this post Link to post Share on other sites
pierremgi 4906 Posted May 20, 2017 _potentialLoc = [bomb1,bomb2,bomb3,bomb4,bomb5,bomb6,bomb7,bomb8,bomb9,bomb10]; _bombRandom = _potentialLoc deleteAt (floor random count _potentialLoc); now _potentialLoc returns the 9 remaining bombs. Share this post Link to post Share on other sites