Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. /* skrypt z edytora:
  2. building = nearestBuilding trig;
  3. nPos = building call BIS_fnc_buildingPositions;
  4. p1 doMove (building buildingPos random count nPos);
  5. */
  6.  
  7. private ["_unit","_targetBuildingMarker","_targetBuilding","_nPositions"];
  8.  
  9. _unit = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
  10. _targetBuildingMarker = [_this, 1, objNull, [objNull]] call BIS_fnc_param;
  11. _targetBuilding = objNull;
  12. _nPositions = [];
  13.  
  14. if (_targetBuildingMarker != objNull) then {
  15. _targetBuilding = nearestBuilding _targetBuildingMarker;
  16. _nPositions = _targetBuilding call BIS_fnc_buildingPositions;
  17. }else{
  18. _targetBuilding = nearestBuilding position _unit;
  19. _nPositions = _targetBuildingPos call BIS_fnc_buildingPositions;
  20. }
  21.  
  22. _unit doMove ( _targetBuilding buildingPos random count _nPositions);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement