mmmyum

0.1 spawn_permaLoot.sqf

Apr 29th, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////mmmyum
  2. private ["_center","_allBldngs","_type","_config","_canLoot","_handle","_debugA","_countBldngs","_debugB","_debugC"];
  3. diag_log("MMMYUM: BEGIN PermaLootSpawn...");
  4. _debugC = 1;
  5. _center = [6143.6,7721.5,1];//stary coords, centerish
  6. _debugA = count _center;
  7. _debugB = _center select 0;
  8. diag_log format ["MMMYUM: CENTER:| %1 | COUNT:| %2 | POS 0:| %3",_center,_debugA,_debugB];
  9. _allBldngs = _center nearObjects ["building",20000];
  10. _countBldngs = count _allBldngs;
  11. diag_log format ["MMMYUM: BLDNGS:| COUNT:| %1 | ",_countBldngs];
  12. {
  13. _type = typeOf _x;
  14. _config = configFile >> "CfgBuildingLoot" >> _type;
  15. _canLoot = isClass (_config);
  16. diag_log format ["MMMYUM: CANLOOT:| %1 |",_canLoot];
  17. diag_log format ["MMMYUM: TYPE:| %1 |",_type];
  18. if (_canLoot) then {
  19. //_handle = [_x] spawn building_spawnLoot;//his
  20. _handle = [_x] execVM "fixes\building_spawnLoot.sqf";
  21. waitUntil{scriptDone _handle};
  22. _x setVariable ["permaLoot",true];
  23. };
  24. _debugC = _debugC + 1;
  25. } forEach _allBldngs;
  26. diag_log format ["MMMYUM: END: PermaLootSpawn times cycled:| %1 |",_debugC];
  27. exit
  28. ////////////////////////////////////////////////////////////////////////////////mmmyum
Advertisement
Add Comment
Please, Sign In to add comment