Rektavu 10 Posted October 19, 2014 I saw that you can now place weapons on the ground lose in the new update. but how would i be avaible to make weapons spawn randomly around the map? i tried some stuff but it turned out shit :/ please i need help Share this post Link to post Share on other sites
iceman77 18 Posted October 19, 2014 That's asking quite a bit to be able to "spawn random weapons, randomly around the map". I say this because I suspect you want the weapons to spawn in buildings, on tables etc etc... randomly. Dreadentity made a loot spawning framework. Also here's some additional code to get you started with some ideas. _cfgArray = " (getNumber (_x >> 'scope') >= 2) && {getText (_x >> 'vehicleClass') in ['WeaponsPrimary']}" configClasses (configFile >> "CfgVehicles"); _posArray = [ [5655,5678,12], [5653,5672,10], [5455,5578,6] ]; _weaponArray = []; { _weaponArray pushBack ( configname _x ); } forEach _cfgArray; _randomWeapon = _weaponArray call BIS_fnc_selectRandom; _randomPos = _posArray call BIS_fnc_selectRandom; _groundWeapon = createVehicle [_randomWeapon, _randomPos, [], 0, "CAN_COLLIDE"]; Share this post Link to post Share on other sites
jshock 513 Posted October 19, 2014 You could possibly achieve what you are looking for with this code snippet, you may have to make some alterations, but it seems to be what you want..? Share this post Link to post Share on other sites
iceman77 18 Posted October 19, 2014 Yeah he'd be better off using Dread's loot spawning framework. He's lucky Dread had just posted that. Coming and asking "Hey write me a loot spawning system" is a bit much haha. Share this post Link to post Share on other sites
Rektavu 10 Posted October 21, 2014 thanks everyone (and yea i was kind of lazy) im not that good at scripting i dont even know the full basics and im trying to lern more and more everyday and hopefully one day i can make a mission without asking for help :p Thanks anyway :D Share this post Link to post Share on other sites