This command doesn't return any house or building placed in editor (with createVehicle). Use nearestObjects instead:
nearestObjects [player, ["House", "Building"], 50] select 0
Also available as Markdown and JSON, or read the original wiki page.
Finds the nearest building to a given object or position. A "building" is defined as an object that is of class "House" and contains a path LOD.
nearestBuilding position
Parameters:
position: Object or Position2D or PositionAGLReturns: Object
_nBuilding = nearestBuilding player;
_nBuilding = nearestBuilding position player;
buildingPos · nearestObject · nearestObjects · nearObjects · nearestLocation · nearEntities · nearTargets · nearSupplies · nearestLocationWithDubbing · nearObjectsReady · nearRoads · nearestMines
This command doesn't return any house or building placed in editor (with createVehicle). Use nearestObjects instead:
nearestObjects [player, ["House", "Building"], 50] select 0
Some large buildings are not found by this command. "Land_Airport_Tower_F", "Land_Offices_01_V1_F" and "Land_Hotel_02_F" are examples.