Jump to content
  • 0

Understanding bis_fnc_findsafepos better


Richie

Question

Hello :)

 

Can someone help me understand and use bis_fnc_findsafepos better ?

 

The problem is we run a Taviana map and bis_fnc_findsafepos insista on putting everything on mountains and on the big island, Is there a way to force it to use the small island and at sea level or not on the top of a mountain ?

 

Rather than center for the center of the map, does it have left or west as an option or must it be center ?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Don't know what you mean you have to set the center and radius of the possible position so it doesn't choose a random point on teh whole map? :o

http://tactical.nekromantix.com/wiki/doku.php?id=arma2:scripting:bis_fnc_findsafepos

 

Depending what you want you could also use findEmptyPosition: http://community.bistudio.com/wiki/findEmptyPosition

Link to comment
Share on other sites

  • 0

Sorry, I'll try to explain better :)

 

At the minute my bis_fnc_findsafepos is always choosing the tops of mountains for events and missions and always on the large island.

 

I'd like to somehow make them spawn at sea level or not on top of mountains.

I'd also like it to use the smaller island, I thought making the 'Minimum distance' thousands of meters would force it to choose a location away from the center of the map.

 

Does it have to use 'Center' for the start point ? Is there any other parameters i could use ?

 

My understainding of this example [getMarkerPos "center",4000,20000,10,0,25,0] call BIS_fnc_findSafePos; means :

 

Start point = Center, can i use another value or fixed start coordinates ?

Spawn a minimum of 4,000 meters away from Center

Spawn a maximum of 20,000 meters away from Center

Spawn at least 10 meters from the nearest object

Not spawn in water

Terrain i don't quite understand, can it be an altitude ?

Shore mode

Link to comment
Share on other sites

  • 0

The point of that function is to find a safe position near a point and not all over the map.. So i would suggest NOT to use your marker (getMarkerPos), but a custom position, you can enter a point on the small island and it will look around that only..
"Center" is the default center point of every map, i would not use that

 

The terrain option is just the steepness of the terrain not the altitude, don't ask me what the range of that is or what 20 means exactely :p

Link to comment
Share on other sites

  • 0

if it chooses montains reduce the steepness to 1 and test again, less means less steep I guess since the vehicle trader uses "1" I assume it is flat ground, but that can be anywhere the findPos function is not random it will find the nearest safe position I assume.

I would just use a list of different positions (or markers if you prefer) where it can chose from and than find a safe position near that, you know what I mean?

By default there is the center marker and also spawn position for players are different markers I think. Check your mission.sqm and look for class Markers, there should be a list of markers you could use if you don't want to use your own or create random positions:

class Markers
{
	items=31;
	class Item0
	{
		position[]={10732.087,193.02972,12687.841};
		name="center";
		type="Empty";
	};
	class Item1
	{
		position[]={125.80597,0.55931646,158.21259};
		name="respawn_west";
		type="Empty";
	};
	class Item2
	{
		position[]={17587.729,206.90927,4952.0513};
		name="spawn0";
		type="Empty";
	};
	class Item3
	{
		position[]={9093.4707,33.920578,2614.3794};
		name="spawn2";
		type="Empty";
	};
	class Item4
	{
		position[]={15954.211,19.612961,15847.49};
		name="spawn3";
		type="Empty";
	};
	class Item5
	{
		position[]={13560.766,32.488033,19300.455};
		name="spawn4";
		type="Empty";
	};
	class Item6
	{
		position[]={17743.729,255.98103,10299.182};
		name="spawn5";
		type="Empty";
	};
	class Item7
	{
		position[]={15245.996,56.273598,17424.979};
		name="spawn6";
		type="Empty";
	};
	class Item8
	{
		position[]={16674.049,52.588493,13930.056};
		name="spawn7";
		type="Empty";
	};
	class Item9
	{
		position[]={11361.38,24.342115,6684.8628};
		name="spawn8";
		type="Empty";
	};
	class Item10
	{
		position[]={12268.094,77.620689,9762.8389};
		name="spawn9";
		type="Empty";
	};
	class Item11
	{
		position[]={18292.107,70.055626,7537.231};
		name="spawn10";
		type="Empty";
	};
	class Item12
	{
		position[]={16596.275,44.942032,10199.313};
		name="ArmedChoppers";
		text="Pete's Armed Choppers";
		type="mil_dot";
		colorName="ColorGreen";
	};
	class Item13
	{
		position[]={8140.8579,182.22856,21315.977};
		name="HighEndWeaponsAmmo";
		text="Robby and Jacks Ammo/Weapons";
		type="mil_dot";
		colorName="ColorGreen";
	};
	class Item14
	{
		position[]={10159.278,84.586113,18706.787};
		name="UnarmedChopperF";
		text="Hanz Unarmed Choppers";
		type="mil_dot";
		colorName="ColorOrange";
	};
	class Item15
	{
		position[]={14621.356,-0.29903007,18865.057};
		name="BoatVendor1";
		text="Capt. Yak";
		type="mil_triangle";
		colorName="ColorBlue";
	};
	class Item16
	{
		position[]={14976.129,20.700497,18411.604};
		name="Wholesaler1";
		text="Wholesaler Reynolds";
		type="mil_box";
		colorName="ColorBlack";
	};
	class Item17
	{
		position[]={10169.444,75.022919,18726.105};
		name="HeroVendor";
		text="Chuck's Hero Shop";
		type="Strongpoint";
		colorName="ColorGreen";
	};
	class Item18
	{
		position[]={15097.365,38.066315,14809.885};
		name="ArmedVehicles";
		text="Tom's Armed Vehicles";
		type="mil_dot";
		colorName="ColorBlack";
	};
	class Item19
	{
		position[]={16149.238,39.333866,13584.271};
		name="Doctor2";
		text="Bones";
		type="mil_dot";
		colorName="ColorGreen";
	};
	class Item20
	{
		position[]={16449.648,58.051521,11484.582};
		name="PlaneVendor";
		text="Murdock's Planes";
		type="mil_dot";
		colorName="ColorBlack";
	};
	class Item21
	{
		position[]={15309.642,14.993002,9376.416};
		name="VehiclePartsVendors";
		text="Sven and Slav's Parts/Vehicles";
		type="mil_circle";
		colorName="ColorBlack";
	};
	class Item22
	{
		position[]={13345.836,172.991,8617.3633};
		name="GeneralSupplies";
		text="Trin's Food/Water";
		type="mil_dot";
		colorName="ColorBlack";
	};
	class Item23
	{
		position[]={16445.291,174.31848,8331.085};
		name="GeneralSupplies1";
		text="Melissa's General Supplies";
		type="mil_dot";
		colorName="ColorGreen";
	};
	class Item24
	{
		position[]={17577.686,177.15375,6392.5615};
		name="Doctor3";
		text="Dr. Vu";
		type="mil_dot";
		colorName="ColorRed";
	};
	class Item25
	{
		position[]={5573.3174,35.799999,8749.377};
		name="BanditWeaponAmmo";
		text="Gabe's and Cohaagen's Weapons/Ammo";
		type="mil_circle";
		colorName="ColorBlack";
	};
	class Item26
	{
		position[]={3262.4954,4.9681244,8182.8096};
		name="Armed Boats";
		text="Chad's Armed Boats";
		type="mil_dot";
		colorName="ColorBlack";
	};
	class Item27
	{
		position[]={6991.436,70.179367,8303.6289};
		name="BanditChoppersRepair";
		text="Parts and Bandit Vendor";
		type="mil_circle";
		colorName="ColorRed";
	};
	class Item28
	{
		position[]={3201.4695,34.2192,7553.8667};
		name="GeneralSupplies3";
		text="Mrs. Doubtfire";
		type="mil_dot";
		colorName="ColorBlack";
	};
	class Item29
	{
		position[]={8807.9297,23.021162,2342.54};
		name="Wholesaler2";
		text="Wholesaler Darren";
		type="mil_box";
		colorName="ColorBlack";
	};
	class Item30
	{
		position[]={10220.17,76.156166,18653.834};
		name="RepairShop";
		text="Scott's Repair Shop";
		type="mil_dot";
		colorName="ColorGreen";
	};
};

that is taken from "MPMissions\DayZ_Epoch_13.Tavi\mission.sqm", the getMarkerPos function will just return the position for that marker, you could also set a random position instead of using a marker, like this:

[[x,y,z],0,1000,10,0,25,0] call BIS_fnc_findSafePos;

just place the x,y,z values in there and it will finmd a safe position around 1000m of that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...