razerhoriizon 10 Posted November 27, 2017 Hey there ! I saw that the command 'createSimpleObject' is used only on scripts, or i didn't see that one out of scripts so, i just wonder if it was possible to just put them onto a game logic or on a trigger ? and how can i do that ? For example, the bush/plant that i want to add is "a3\plants_f\Bush\b_Thistle_Thorn_Green.p3d" Sorry for that question btw i'm really noob onto scripting but i just wanna add some bushes at a place Thanks for reading Share this post Link to post Share on other sites
EO 11275 Posted November 27, 2017 Further reading... https://community.bistudio.com/wiki/createSimpleObject https://community.bistudio.com/wiki/createSimpleObject/objects https://community.bistudio.com/wiki/Arma_3_Simple_Objects Further advice, I'd try a using a different bush, that particular one in your example is broken. Share this post Link to post Share on other sites
pierremgi 4851 Posted November 28, 2017 It seems to work for me: _posit = player getPos [20, getdir player]; _bush = createSimpleObject ["a3\plants_f\Bush\b_Thistle_Thorn_Green.p3d",(AGLToASL _posit) vectorAdd [0,0,0.3]]; Share this post Link to post Share on other sites
razerhoriizon 10 Posted November 28, 2017 But in which module or init i need to put that ? Share this post Link to post Share on other sites
pierremgi 4851 Posted November 29, 2017 you can place it in initServer.sqf or in init.sqf with a server condition : if (isServer) then { _bushPositions = < your array of positions here>; { _bush = createSimpleObject ["a3\plants_f\Bush\b_Thistle_Thorn_Green.p3d",(AGLToASL _x) vectorAdd [0,0,0.3]] } forEach _bushPositions; }; Share this post Link to post Share on other sites
Fr3eMan 16 Posted September 24, 2023 On 11/28/2017 at 4:45 AM, pierremgi said: It seems to work for me: _posit = player getPos [20, getdir player]; _bush = createSimpleObject ["a3\plants_f\Bush\b_Thistle_Thorn_Green.p3d",(AGLToASL _posit) vectorAdd [0,0,0.3]]; Hi Pierremgi, is possible to replace the player position with random position in a marker area? Share this post Link to post Share on other sites
pierremgi 4851 Posted September 24, 2023 You can randomize a position from any reference like getpos player getMarkerPos "yourMarker" then, something like: _posit = getMarkerPos "yourmarker" getPos [markerRadius * random sqrt 1, random 360]; Note: the random sqrt 1 factor is a mean for linear distribution from center to border. If not, you have more chance for a point near center (density at random in circle area when called by distance/azimuth) Note: markerRadius can be found by (markerArea "yourMarker" #0) if a circle. For ellipse or rectangle, you can add condition and loop til the point is inside the area: private _greatAxis = (markerSize "yourMarker" #0) max (markerSize "yourMarker" #1); private "_posit"; while {_posit = getMarkerPos "yourmarker" getPos [_greatAxis * random sqrt 1, random 360]; !(_posit inArea "yourMarker")} do {}; _posit; 2 Share this post Link to post Share on other sites
Fr3eMan 16 Posted September 24, 2023 Clear, thanks! Share this post Link to post Share on other sites