bangabob 41 Posted August 29, 2013 Hello. I am trying to make a unit spawn within a marker area. However this is harder than it seems. If the marker is a perfect circle then i can use the following code since the marker is the same for both X and Y axis. _eosMkr="m1"; _eosPOS=markerpos _eosMkr; _eosMkrSizeX= getMarkerSize _eosMkr select 0; _eosMkrSizeY= getMarkerSize _eosMkr select 1; _spwnposNew = [_eosPOS,_eosMkrSizeY , random 360] call BIS_fnc_relPos; However, if the marker is a rectangle or non-symmetrical then i can get positions outside the marker zone since my current code only draws distance from the Y size of the marker. Thanks for reading. Any help is appreciated Share this post Link to post Share on other sites
Coding 12 Posted August 29, 2013 https://community.bistudio.com/wiki/markerShape if (markerShape YOURMARKER == "ELLIPSE") then//dont know if uppercase or how it is written... { //your code } else { //code to spawn in rectangle } Share this post Link to post Share on other sites
spunfin 34 Posted August 29, 2013 I use this method to check if something is inside ELLIPSE or RECTANGLE. Perhaps you can adapt it too. Share this post Link to post Share on other sites
cuel 25 Posted August 29, 2013 Try this by Shuko http://forums.bistudio.com/showthread.php?89376-SHK_pos Share this post Link to post Share on other sites