Astrama 0 Posted December 12, 2017 Hey, so basically I'm looking for creating a marker on the map at the location of all plane wrecks on Tanoa. I have taken this script and changed the class name of the building to match with the plane wreck but this didn't work... Can you help me please? Thank's! _middle = worldSize/2; _spawnCenter = [_middle,_middle,0]; _maxDistance = _middle; _buildingTypes = ["Land_HistoricalPlaneWreck_02_front_F"]; { _buildingType = _x; _building = _spawnCenter nearObjects [_buildingType, _maxDistance]; { _foundBuilding = _x; _pos = _foundBuilding buildingPos 0; _location = getPosATL _foundBuilding; _marker = createMarker [format ["%1", _foundBuilding],_pos]; _marker setMarkerShape "Icon"; _marker setMarkerSize [1,1]; _marker setMarkerType "mil_dot"; _marker setMarkerBrush "Solid"; _marker setMarkerAlpha 0.5; _marker setMarkerColor "ColorRed"; _marker setMarkerText format["%1", _foundBuilding]; }forEach _building; }forEach _buildingTypes; Share this post Link to post Share on other sites
POLPOX 779 Posted December 12, 2017 Most of the terrain objects don't have classname, so you need to getModelInfo to correct the data. _halfSize = worldSize/2 ; { if ((getModelInfo _x select 0) find "historicalplanewreck" != -1) then { _marker = createMarker [format ["%1",_x],getPos _x]; _marker setMarkerShape "Icon"; _marker setMarkerSize [1,1]; _marker setMarkerType "mil_dot"; _marker setMarkerBrush "Solid"; _marker setMarkerAlpha 0.5; _marker setMarkerColor "ColorRed"; _marker setMarkerText format["%1",_x]; } ; } forEach (nearestTerrainObjects [[_halfSize,_halfSize,0],["HIDE"],_halfSize]) ; This should do it. EDIT: use "historicalplane" instead of "historicalplanewreck" to find debris too. 3 Share this post Link to post Share on other sites