_SCAR 139 Posted May 16, 2017 Hello, I have a "Land_Noticeboard_F" object in a terrain that I'd like to customize with a texture. I am though unable to get the object, let alone customize it. If I set no class name, I get: nearestObjects [[2132, 2111], [], 10]; => [6420:noticeboard_f.p3d] But then, all of the following fails (= return an empty array): nearestObjects [[2132, 2111], ["Land_Noticeboard_F"], 10]; nearestObjects [[2132, 2111], ["Noticeboard_F"], 10]; nearestObjects [[2132, 2111], ["Noticeboard"], 10]; nearestObjects [[2132, 2111], ["noticeboard_f.p3d"], 10]; Any hints on how to get the object? Share this post Link to post Share on other sites
johnnyboy 3745 Posted May 16, 2017 I think your nearestObjects with no class name is returning the object you want. You just need to confirm its the right one, then use it. Something like this maybe...(untested): _objs = nearestObjects [[2132, 2111], [], 10]; _myBoard = objNull; { if (typeOf _x == "Land_Noticeboard_F") then { _myBoard = _x; }; } forEach _objs; _myBoard setObjectTextureGlobal [0, "StripClubAdvertisement.paa"]; 1 Share this post Link to post Share on other sites
Midnighters 152 Posted May 16, 2017 This is weird though because wouldn't Quote [6420:noticeboard_f.p3d] be referencing a config entry? Share this post Link to post Share on other sites
_SCAR 139 Posted May 16, 2017 Johnny I will try your idea asap. Midnighters: indeed, I would have expected a class, not a reference to a model file name. Share this post Link to post Share on other sites
Midnighters 152 Posted May 16, 2017 Quote Array - array of objects wtf (return value) Share this post Link to post Share on other sites
_SCAR 139 Posted May 16, 2017 1 minute ago, Midnighters said: wtf (return value) not sure I understand :) Share this post Link to post Share on other sites
pierremgi 4743 Posted May 16, 2017 name your board, you will not have to "search" for it. Or, if already on map, place a poster on it (see editor objects) then apply your texture on poster. Share this post Link to post Share on other sites
_SCAR 139 Posted May 16, 2017 1 minute ago, pierremgi said: name your board, you will not have to "search" for it. It's a terrain object. How can I name it? Share this post Link to post Share on other sites
Midnighters 152 Posted May 16, 2017 1 minute ago, pierremgi said: name your board, you will not have to "search" for it. I thought the whole point was that it was a terrain builder object and not a editor placed object. Share this post Link to post Share on other sites
pierremgi 4743 Posted May 16, 2017 corrected my post Share this post Link to post Share on other sites
Midnighters 152 Posted May 16, 2017 I think the thread starter wants the boards that exist already in the map to be replaced with a texture. Sort of like if you wanted to change the pizza advertisements in Sahrani, then you go ahead and do so 1 Share this post Link to post Share on other sites
pierremgi 4743 Posted May 16, 2017 14 minutes ago, Midnighters said: I think the thread starter wants the boards that exist already in the map to be replaced with a texture. Sort of like if you wanted to change the pizza advertisements in Sahrani, then you go ahead and do so Yes, the reason why I added the poster solution in my first post. I think you can't change any texture on map object. Share this post Link to post Share on other sites
_SCAR 139 Posted May 16, 2017 The following code will work fine if used on an object added in a mission, it will not work for a terrain object: _noticeBoard = nearestTerrainObjects [[2800.084, 3638.502], [], 1] select 0; _noticeBoard setObjectTexture [0, "#(rgb,8,8,3)color(0,0,1,1)"]; The _noticeBoard variable gets defined, but the texture does not get applied. Share this post Link to post Share on other sites
johnnyboy 3745 Posted May 16, 2017 3 minutes ago, pierremgi said: Yes, the reason why I added the poster solution in my first post. I think you can't change any texture on map object. That's a bummer. Like Pierre says, you will have to hide it with a poster. Or create your own billboard of same type and set its pos to be a skootch in front of existing one. _myNewBillBoard setpos (_terrainBillBoard modelToWorld [0, .05, 0]); It might look ok, just the posts will look fatter and the billboard will look thicker from the side. See if it looks ok. Easier than finding the exact position to place a poster. 1 Share this post Link to post Share on other sites
Lucullus 71 Posted May 16, 2017 8 minutes ago, johnnyboy said: _myNewBillBoard setpos (_terrainBillBoard modelToWorld [0, .05, 0]); and then hide the _terrainBillBoard with hideObject _terrainBillBoard; 2 Share this post Link to post Share on other sites
Midnighters 152 Posted May 16, 2017 Just now, Lucullus said: and then hide the _terrainBillBoard with hideObject _terrainBillBoard; * global variant for servers * Share this post Link to post Share on other sites
Lucullus 71 Posted May 16, 2017 2 minutes ago, Midnighters said: * global variant for servers * yup hideObjectGlobal _terrainBillBoard; Share this post Link to post Share on other sites