Valixx 11 Posted September 19, 2013 Hey guys. After a little break, i got a question. :/ Is it possible to get a random position out of given markers? I've placed a lot of markers on altis and they are set up like: town_name1 town_name2 airfield_name1 airfield_name2 cap_name1 cap_name2 and so on.. If you need more information, please ask. Share this post Link to post Share on other sites
kylania 568 Posted September 19, 2013 _marker = ["town_name1", "town_name2", "airfield_name1", "airfield_name2", "cap_name1", "cap_name2"] call BIS_fnc_selectRandom; player setPos getMarkerPos _marker; If you wanted to place an objective or something at one of those places you could do this: _tower = createVehicle ["Land_TTowerBig_1_F", getMarkerPos "town_name1", ["town_name2", "airfield_name1", "airfield_name2", "cap_name1", "cap_name2"], 0, "CAN_COLLIDE"]; missionNamespace setVariable ["tower",_tower]; publicVariable "tower"; Then you'd end up with a transmitter tower named tower at one of those markers. Share this post Link to post Share on other sites
Valixx 11 Posted September 19, 2013 omg i'm so stupid :mad:... totally forgot the "call BIS_fnc_selectRandom" function... Thanks kylania. *ashamed* If i got further questions, i'll ask in this thread if you don't mind. Cheers, Valixx ---------- Post added at 20:04 ---------- Previous post was at 19:19 ---------- Next question.. If i don't remember all of the placed markers, is there a way of getting the names? Like "getall markers starting with town_".. Share this post Link to post Share on other sites
kylania 568 Posted September 19, 2013 You can use the allMapMarkers command to get all the markers then filter through that with a forEach or something. Share this post Link to post Share on other sites
Valixx 11 Posted September 21, 2013 Thanks kylania. Share this post Link to post Share on other sites