Missing building positions
Closed, ResolvedPublic


Probably more a feature request, seems some buildings lack buildingPositions for AI garrisoning, ordering AI in to buildings or spawning stuff.

Example classname only returns one position.


Restricted Diffusion Commit
Affected classnames
Cyruz created this task.Oct 16 2017, 5:09 PM
torndeco claimed this task.Oct 23 2017, 3:41 AM
Cyruz added a comment.Oct 23 2017, 8:35 AM

This might be of use when debugging, I've not had a chance to check it in-game as it's code I hacked out of an older mission. Just needs a marker placed on the centre of the map called marker1.


cup_fnc_findBuildingPos = {
    private _buildingArray = (getMarkerPos "marker1") nearObjects ["Building", 20000];
    private _buildingCount = 0;
    private _totalBuildingPositions = 0;

        _buildingCount = _buildingCount + 1;
        private _buildingPositions = _x buildingPos -1;
            _totalBuildingPositions = _totalBuildingPositions + 1;
            private _itemBoxPos = getpos _x;
            private _markerstr = createMarker ["markername" + (str _itemBoxPos), _itemBoxPos];
            _markerstr setMarkerColor "ColorRed";
            _markerstr setMarkerShape "ICON";
            _markerstr setMarkerType "hd_dot";
        } forEach _buildingPositions;
    } forEach _buildingArray;
    systemChat format["Total buildings in area: %1", _buildingCount];
    systemChat format["Total building positions: %1", _totalBuildingPositions];

[] call cup_fnc_findBuildingPos;

Thanks, found the issue.
Going to look at making a script to check other CUPs Terrain Assets for similar problem

torndeco closed this task as Resolved by committing Restricted Diffusion Commit.Oct 24 2017, 6:29 AM
torndeco added a commit: Restricted Diffusion Commit.