5 posts / 0 new
Last post
Wolffy.au
Offline
Joined: 24/06/2009
BIS Functions - BIS_fnc_locations

Here are some instructions on how to use the BIS_fnc_locations function.

Firstly, you need to know there are 8 different kind of location types.

  • CityCenter
  • StrongpointArea
  • FlatArea
  • FlatAreaCity
  • FlatAreaCitySmall
  • Airport
  • HQ
  • Custom
  1. In the editor, place an Editor Module - Functions somewhere on your map.
  2. To display all default locations, place the following lines in your INIT.SQF file.

    if (!isServer) exitWith{};
    waitUntil {!isNil "bis_fnc_init"};

    _i = 0;
    markLoc = {
     _loc_type = _this select 0;
     _color = _this select 1;
     _locs = [_loc_type, [[0,0,0],1000000], true] call BIS_fnc_locations;
     {
      _i = _i + 1;
      _n = format["x_%1", _i];
      _m = createMarker [_n, position _x];
      _m setMarkerType "Dot";
      _m setMarkerColor _color;
     } forEach _locs;
    };

    ["CityCenter", "ColorBlack"] call markLoc;
    ["StrongpointArea", "ColorRed"] call markLoc;
    ["FlatArea", "ColorBlue"] call markLoc;
    ["FlatAreaCity", "ColorGreen"] call markLoc;
    ["FlatAreaCitySmall", "Default"] call markLoc;
    ["Airport", "ColorWhite"] call markLoc;
    ["HQ", "ColorOrange"] call markLoc;

    processInitCommands;
    finishMissionInit;
     

  3. Preview the mission, you should see the coloured markers indicating all the different types of map locations. See attached demo missions for quick viewing.

 

AttachmentSize
cB_Locations_1-0.Chernarus.zip1.67 KB
cB_Locations_1-0.utes_.zip1.63 KB
katipo66
Offline
Joined: 11/05/2011
Use these locations as waypoints?

Hi Wolffy,

 

Im Katipo66 also from BIS forums, im really interested in BIS_fnc_locations, what im trying to find is information on how i can make units use these as waypoints, ive been looking for a long time but cannot find any example or information specifically for that, are you able to point me in the right direction.

 

Cheers

Katipo66

katipo66
Offline
Joined: 11/05/2011
Me again,   Well i believe i

Me again,

 

Well i believe i found something in your 'ctb_co16_boersplain_1-7.takistan' mission with the crB_WaypointPatrol.sqf

 

not sure if its the right thing im looking for but basically what i want to find is something that enables any unit placed on the map to be able to patrol the whole map.

 

Anyway i stripped it down somewhat and figured out if i made the AO cover the whole map and uncomment "_locs = ["AO", ["CityCenter"]] call compile preprocessFileLineNumbers "crB_scripts\LocationsZone.sqf";" then it picks up all locations.

 

Do i need to use the marker at all? is it possible to call it differently?

Wolffy.au
Offline
Joined: 24/06/2009
Sorry Katipo, didn't realise

Sorry Katipo, didn't realise you posted.

So am I right in understanding, you want to say get a squad to patrol from Hilltop to Hilltop? And you want to know how to use the BIS_fnc_locations function to identify all the Hilltops?

katipo66
Offline
Joined: 11/05/2011
Hey Wolffy,   All good man, i

Hey Wolffy,

 

All good man, i know how it is... anyway i figured it out sort of, from this post

Sorry, a bit wordy...

Because im lazy or too tired at times what ive always thought would be cool is to just place what ever units blufor and opfor i want on a map and let them sort themselves out, and with your scripts i more or less have that, infantry and vehicles go off and patrol, demonized wrote me a support script that i believe works with this and i also included Dimitri_Harkov's radio scripts so that i get informed off any contact, so what i have is a pretty cool dynamic template i can either just jump in and run around or add to.

I guess i just want to know is there a better way to achieve this, if so where should i look? i believe ive searched all the threads from here to Ofpec to BIS forums? im no scripter/coder guy but im prepared to have a go as like above.

 

 
Original Design by Gary Storey