Custom placed buildings on map

Post your questions, solutions, ideas about Arma mission editing, scripting, modding, etc.
Baret
Community Member
Posts: 461

Custom placed buildings on map

Post#1 » Fri 16 Dec, 2016 7:54 pm

I heard that for EUTW PvP you guys have a scripting solution to show custom buildings (placed in the editor) on the map like default buildings. This would be really useful. Would you mind sharing a snippet?

User avatar
GiPPO
EUTW Management
Posts: 7130

Re: Custom placed buildings on map

Post#2 » Fri 16 Dec, 2016 9:26 pm

We basically use the bounding box of the object.
And we also separate classes from the game, like military, wreckage, round objects, etc.

There a bis function for creating such markers, but it's probably not as precise and unique for each object:
https://community.bistudio.com/wiki/BIS ... gBoxMarker

Not sure if I can post our own code for this, Void did it, so I give the right to him to decide if he does share or not.
"If It Isn't Documented, It Doesn't Exist"

Loom
Community Member
Posts: 107

Re: Custom placed buildings on map

Post#3 » Sat 17 Dec, 2016 2:25 pm

Thanks GiPPO, pretty easy with that function:

Code: Select all

{
   _aMarkerName = [_x] call BIS_fnc_boundingBoxMarker;
   _aMarkerName setMarkerColor "ColorGrey";
   _aMarkerName setMarkerBrush "SolidFull";
} foreach [shed1, shed2, shed3, shed4, shed5];

That's for named buildings. Getting objects of a given type near a given position shouldn't be that difficult.

Edit:
My final script (not yet a function and fixed radius):

Code: Select all

{
   private _markerForMapMarks = _x;
   {
      private _objectsToMarkOnMap = (getMarkerPos _markerForMapMarks) nearObjects [_x, 320];
      {
         _aMarkerName = [_x] call BIS_fnc_boundingBoxMarker;
         _aMarkerName setMarkerColor "ColorGrey";
         _aMarkerName setMarkerBrush "SolidFull";
      } foreach _objectsToMarkOnMap;
   } foreach ["House", "Wall", "HBarrier_base_F"];
} foreach ["my marker one", "another marker"];

Gamernup
Community Member
Posts: 9

Custom placed buildings on map

Post#4 » Sat 18 May, 2019 5:30 pm

What happens if you use entries like my SNDINFO but using your DSGRUNT name?

Who is online

Users browsing this forum: No registered users and 1 guest