Sign in to follow this  
Followers 0
~EL BARTO~

Safe Zone Relocate for Exile?

3 posts in this topic

Hi, i searching for a mod running with exile like the "safe zone relocate" found here:

https://github.com/oiad/safeZoneRelocate/blob/master/README.md

Maybe someone scripted it for exile and like to share it with the community...i can't find it in the hole forum yet...i tried to rescript it for exile but it will not run :rock:

 

Hallo.

Suche ein Script das Fahrzeuge in der Safezone nach dem Restart in eine Art Junkyard teleportiert, wie z.b. das hier:

https://github.com/oiad/safeZoneRelocate/blob/master/README.md

Habe auch schon selber probiert es für Exile zum Laufen zu bringen...leider ohne Erfolg.

Vllt. gibt es jemanden der so etwas hat und es hier mit uns allen teilen mag...wäre super nett.

 

Edited by ~EL BARTO~

Share this post


Link to post
Share on other sites
On 22.11.2017 at 1:13 PM, ~EL BARTO~ said:

Habe auch schon selber probiert es für Exile zum Laufen zu bringen...leider ohne Erfolg.

Geändert, getestet und für gut befunden. Wenn _useCustomPosition "true" ist - stehen deine Fahrzeuge in der @ _customPosition definierte Position.

Ansonsten werden die Fahzeuge 1km ausserhalb der Safezone positioniert. Safezones werden in _SafeZonePosArry definiert:

/*
	Safe Zone Relocate by salival (https://github.com/oiad)
	Adjusted for EXILE by WURSTKETTE
*/

private ["_safeZonePosArray","_customPosition","_customRadius","_maxDist","_nearVehicles","_objDist","_position","_safeZonePos","_safeZoneRadius","_useCustomPosition"];

_safeZonePosArray = [
	//[[X,Y],radius]
 	[[13336.1, 14475.8],100] 
];


_useCustomPosition = true; // Enable a custom position to move vehicles to (i.e a junk yard)
_customPosition = [23680.5,18419.4,0];  // Position for vehicles to be moved to if _useCustomPosition = true;
_customRadius = 5; // Minimum distance from the custom position to move vehicles to 
_maxDist = 1000; // Maximum distance from the safe zone position to find a safe position or custom position for relocation, setting this too low can make vehicles spawn very close to other vehicles.
_objDist = 15; // Minimum distance from the safe position for relocation to the center of the nearest object. Specifying quite a large distance here will slow the function and might often fail to find a suitable position.

{
	_safeZonePos = _x select 0;
	_safeZoneRadius = _x select 1;
	_nearVehicles = _safeZonePos nearEntities [["Air","LandVehicle","Ship"],_safeZoneRadius];
	{
		if (_useCustomPosition) then {
			_position = [_customPosition,_customRadius,_maxDist,_objDist,1,0,0,[]] call BIS_fnc_findSafePos;
		} else {
			_position = [_safeZonePos,_safeZoneRadius + 50,_maxDist,_objDist,if (_x isKindOf "Ship") then {2} else {0},0,0,[],[_safeZonePos,_safeZonePos]] call BIS_fnc_findSafePos;
		};
		_x setPos _position;
		
		diag_log format ["[SAFEZONE] %1 was moved out of a safe zone to: @%2 %3",typeOf _x,mapGridPosition _position,_position];
	} forEach _nearVehicles;
} forEach _safeZonePosArray;

Bitte, danke - Tschüss.

Edited by WURSTKETTE
2 people like this

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.