travhimself 10 Posted August 27, 2016 I'm using nearestObjects to find and disable all fuel pumps on Tanoa. The search looks something like this: _pumpclasses = [ "Land_FuelStation_Feed_F", // rusty white pump, altis/stratis "Land_fs_feed_F", // oldschool white pump, altis/stratis "Land_FuelStation_01_pump_F", // modern white/red pump, tanoa "Land_FuelStation_02_pump_F" // oldschool yellow pump, tanoa ]; _fuelpumps = nearestObjects [mapcenter, _pumpclasses, mapradius]; { _x enableSimulation false; } foreach _fuelpumps; However, I've discovered that this only finds about half the existing pumps. I ran some experiments with progressively more liberal searches, and I've confirmed that some pumps will not be picked up at all by nearestObjects. Here is an example: A gas station with four fuel pumps: Map showing four fuel pump markers (one of them is partially obscured): I then ran the following code to find and mark ALL buildings nearby: _places = nearestObjects [player, ["All"], 50]; { _position = getPos _x; _positionx = _position select 0; _positiony = _position select 1; _placesmarkername = format ["places%1", _forEachIndex]; _placesmarker = createMarker [_placesmarkername, [_positionx, _positiony] ]; _placesmarkername setMarkerColor "ColorBlack"; _placesmarkername setMarkerType "n_unknown"; } foreach _places; The resulting map shows that only one of the four pumps (the partially obscured one) has been marked. Can anyone take a stab at explaining why this might be happening, and how to work around it? Share this post Link to post Share on other sites
austin_medic 109 Posted August 27, 2016 different classnames for tanoa specific gaspumps possibly. Share this post Link to post Share on other sites
Greenfist 1863 Posted August 27, 2016 _fuelpumps = nearestObjects [player, _pumpclasses, 50]; finds all four pumps on my end...? :confused: You could try: _fuelpumps = nearestTerrainObjects [mapcenter, ["fuelstation"], mapradius, false]; 1 Share this post Link to post Share on other sites
Von Quest 1163 Posted August 27, 2016 _places = nearestObjects [player, ["All"], 50]; { _position = getPos _x; _positionx = _position select 0; _positiony = _position select 1; _placesmarkername = format ["places%1", _forEachIndex]; _placesmarker = createMarker [_placesmarkername, [_positionx, _positiony] ]; _placesmarkername setMarkerColor "ColorBlack"; _placesmarkername setMarkerType "n_unknown"; } foreach _places; The resulting map shows that only one of the four pumps (the partially obscured one) has been marked. All have been marked. Its just the Markers are semi-transparent. Look gain. White to a Grey. Share this post Link to post Share on other sites
travhimself 10 Posted August 27, 2016 Yep, you're absolutely right Von Quest. Did a little more experimenting and noticed the same thing myself. Odd that the markers sometimes layer in front, and sometimes behind. But at any rate, case closed. Thanks to those who chimed in with suggestions! Share this post Link to post Share on other sites