Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* skrypt z edytora:
- building = nearestBuilding trig;
- nPos = building call BIS_fnc_buildingPositions;
- p1 doMove (building buildingPos random count nPos);
- */
- private ["_unit","_targetBuildingMarker","_targetBuilding","_nPositions"];
- _unit = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
- _targetBuildingMarker = [_this, 1, objNull, [objNull]] call BIS_fnc_param;
- _targetBuilding = objNull;
- _nPositions = [];
- if (_targetBuildingMarker != objNull) then {
- _targetBuilding = nearestBuilding _targetBuildingMarker;
- _nPositions = _targetBuilding call BIS_fnc_buildingPositions;
- }else{
- _targetBuilding = nearestBuilding position _unit;
- _nPositions = _targetBuildingPos call BIS_fnc_buildingPositions;
- }
- _unit doMove ( _targetBuilding buildingPos random count _nPositions);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement