gaga11
Well-Known Member
no rmod installed on that vid..Niiiiice you can't use those parachutes without rmod though right?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
no rmod installed on that vid..Niiiiice you can't use those parachutes without rmod though right?
oooooo I asked grafzahl about this when he released the choppers, he said that class wasn't available in chernarus. I played with a10s but never tried the chutes. I am going to have to start tinkering in my test server nowno rmod installed on that vid..![]()
_blacklist = [[0.101, 15360.1], [11075.6,5328.23]];
//first array: top left corner, second array: somewhere around msta
_spawnMarker = [8910.85,3474.14];
//somewhere near pusta
_preWaypointPos = [_spawnMarker,0,8000,10,0,1000,0,_blacklist] call BIS_fnc_findSafePos;
17:41:28 Error in expression <"_maxX", "_minY", "_maxY"];
_minX = _tl select 0;
_maxX = _br select 0;
_minY = >
17:41:28 Error position: <select 0;
_maxX = _br select 0;
_minY = >
17:41:28 Error select: Type Number, expected Array,Config entry
17:41:28 File ca\modules\functions\misc\fn_isPosBlacklisted.sqf, line 37
kinda stuck at the moment, i want to get the drop locations for chernarus by using bis_fnc_findsafepos
goal is to only drop it in some kind of rotated L shape area along the coast ... to help the bambies to gear up with some basic stuff coz i dont want them to mirror the heli crashes
i defined a new center and radius.. and blacklisted some area... and its just not doing it :S
what i got:
Code:_blacklist = [[0.101, 15360.1], [11075.6,5328.23]]; //first array: top left corner, second array: somewhere around msta _spawnMarker = [8910.85,3474.14]; //somewhere near pusta _preWaypointPos = [_spawnMarker,0,8000,10,0,1000,0,_blacklist] call BIS_fnc_findSafePos;
result:
Code:17:41:28 Error in expression <"_maxX", "_minY", "_maxY"]; _minX = _tl select 0; _maxX = _br select 0; _minY = > 17:41:28 Error position: <select 0; _maxX = _br select 0; _minY = > 17:41:28 Error select: Type Number, expected Array,Config entry 17:41:28 File ca\modules\functions\misc\fn_isPosBlacklisted.sqf, line 37
anyone got an idea?
scriptName "Functions\misc\fn_findSafePos.sqf";
/*
File: findSafePos.sqf
Author: Joris-Jan van 't Land
Description:
Function to retrieve and dynamic position in the world according to several parameters.
Parameter(s):
_this select 0: center position (Array)
Note: passing [] (empty Array), the world's safePositionAnchor entry will be used.
_this select 1: minimum distance from the center position (Number)
_this select 2: maximum distance from the center position (Number)
Note: passing -1, the world's safePositionRadius entry will be used.
_this select 3: minimum distance from the nearest object (Number)
_this select 4: water mode (Number)
0: cannot be in water
1: can either be in water or not
2: must be in water
_this select 5: maximum terrain gradient (average altitude difference in meters - Number)
_this select 6: shore mode (Number):
0: does not have to be at a shore
1: must be at a shore
_this select 7: (optional) blacklist (Array of Arrays):
(_this select 7) select X: Top-left and bottom-right coordinates of blacklisted area (Array)
_this select 8: (optional) default positions (Array of Arrays):
(_this select 8) select 0: default position on land (Array)
(_this select 8) select 1: default position on water (Array)
Returns:
Coordinate array with a position solution.
TODO:
* Maybe allow passing several combinations of position, min and max dist ... so that you can
avoid several things?
* Interpretation of minDist / maxDist is wrong. It's not true distance that is used. Too bad?
*/
scopeName "main";
private ["_pos", "_minDist", "_maxDist", "_objDist", "_waterMode", "_maxGradient", "_shoreMode", "_defaultPos", "_blacklist"];
_pos = _this select 0;
_minDist = _this select 1;
_maxDist = _this select 2;
_objDist = _this select 3;
_waterMode = _this select 4;
_maxGradient = _this select 5;
_shoreMode = _this select 6;
if (_shoreMode == 0) then {_shoreMode = false} else {_shoreMode = true};
_blacklist = [];
if ((count _this) > 7) then
{
_blacklist = _this select 7;
};
_defaultPos = [];
if ((count _this) > 8) then
{
_defaultPos = _this select 8;
};
/* See if default world values should be used. */
if ((count _pos) == 0) then
{
_pos = getArray(configFile >> "CfgWorlds" >> worldName >> "safePositionAnchor");
};
if ((count _pos) == 0) exitWith {debugLog "Log: [findSafePos] No center position was passed!"; []}; /* TODO: instead return defaults below. */
if (_maxDist == -1) then
{
_maxDist = getNumber(configFile >> "CfgWorlds" >> worldName >> "safePositionRadius");
};
/* TODO: Validate parameters. */
private ["_newPos", "_posX", "_posY"];
_newPos = [];
_posX = _pos select 0;
_posY = _pos select 1;
/* Limit the amount of attempts at finding a good location. */
private ["_attempts"];
_attempts = 0;
while {_attempts < 1000} do
{
private ["_newX", "_newY", "_testPos"];
_newX = _posX + (_maxDist - (random (_maxDist * 2)));
_newY = _posY + (_maxDist - (random (_maxDist * 2)));
_testPos = [_newX, _newY];
/* Blacklist check. */
/* TODO: Do not use function when the blacklist is empty? */
if (!([_testPos, _blacklist] call BIS_fnc_isPosBlacklisted)) then
{
if ((_pos distance _testPos) >= _minDist) then
{
if (!((count (_testPos isFlatEmpty [_objDist, 0, _maxGradient, _objDist max 5, _waterMode, _shoreMode, objNull])) == 0)) then
{
_newPos = _testPos;
breakTo "main";
};
};
};
_attempts = _attempts + 1;
};
/* No position was found, use defaults. */
if ((count _newPos) == 0) then
{
if (_waterMode == 0) then
{
if ((count _defaultPos) > 0) then
{
_newPos = _defaultPos select 0;
}
else
{
/* Use world Armory default position: */
_newPos = getArray(configFile >> "CfgWorlds" >> worldName >> "Armory" >> "positionStart");
};
}
else
{
if ((count _defaultPos) > 1) then
{
_newPos = _defaultPos select 1;
}
else
{
/* Use world Armory default water position: */
_newPos = getArray(configFile >> "CfgWorlds" >> worldName >> "Armory" >> "positionStartWater");
};
};
};
if ((count _newPos) == 0) then
{
/* Still nothing was found, use world center positions. */
_newPos = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
};
_newPos
scriptName "Functions\misc\fn_isPosBlacklisted.sqf";
/*
File: isPosBlacklisted.sqf
Author: Joris-Jan van 't Land & Karel Moricky
Description:
Function checks a blacklist and sees if the given position is on it or not.
Parameter(s):
_this select 0: position (Array)
_this select 1: blacklist (Array or Object/Trigger)
Returns:
Is the position blacklisted or not (Boolean)
*/
private ["_pos", "_list", "_x", "_y", "_listed"];
_pos = _this select 0;
_list = _this select 1;
_x = _pos select 0;
_y = _pos select 1;
_listed = false;
/* Go through all areas in the blacklist. */
for "_i" from 0 to ((count _list) - 1) do {
_current = (_list select _i);
switch (typename _current) do {
/* --- Definition by top-left and bottom right corner ------------------------------- */
case (typeName []): {
/* Check the top-left and bottom-right coordinates. */
private ["_tl", "_br"];
_tl = _current select 0;
_br = _current select 1;
private ["_minX", "_maxX", "_minY", "_maxY"];
_minX = _tl select 0;
_maxX = _br select 0;
_minY = _br select 1;
_maxY = _tl select 1;
if ((_x > _minX) && (_x < _maxX) && (_y > _minY) && (_y < _maxY)) exitWith {
_listed = true;
};
};
/*--- Definition by trigger -------------------------------------------------------- */
case (typeName objNull): {
if ([_current,_pos] call BIS_fnc_inTrigger) exitwith {
_listed = true;
};
};
default {
debuglog "Log: Error in isPosBlacklisted.sqf - wrong input data.";
};
};
};
_listed
//Check for hackers
" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n
nul = [
6, //Number of the guaranteed Loot-Piles at the Crashside
3, //Number of the random Loot-Piles at the Crashside 3+(1,2,3 or 4)
(50*60), //Fixed-Time (in seconds) between each start of a new Chopper
(15*60), //Random time (in seconds) added between each start of a new Chopper
0.75, //Spawnchance of the Heli (1 will spawn all possible Choppers, 0.5 only 50% of them)
'center', //'center' Center-Marker for the Random-Crashpoints, for Chernarus this is a point near Stary
8000, // [106,[960.577,3480.34,0.002]]Radius in Meters from the Center-Marker in which the Choppers can crash and get waypoints
true, //Should the spawned crashsite burn (at night) & have smoke?
false, //Should the flames & smoke fade after a while?
2, //RANDOM WP
3, //GUARANTEED WP
1 //Amount of Damage the Heli has to get while in-air to explode before the POC. (0.0001 = Insta-Explode when any damage//bullethit, 1 = Only Explode when completly damaged)
] spawn server_spawnAN2;
server_spawnAN2 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnAN2.sqf";
server_carepackagedrop = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_carepackagedrop.sqf";
anyways, i added some static points along the coast as a workaround... gonna release my first ugly version... its heavily customized for my own needs...
first of all, credits to grafzahl who wrote the original animated heli crash script and to Leh2012 and Gerasimow9 who wrote the c130 cargo drop script...
===========================================================
so, coz i'm lazy and stuff i havent renamed many variables and there are some unused in the script still, cba to clean it up yet...
please note: there are static coords for drop points in the script, they are designed to work with chernarus!!!
===========================================================
1. download http://www.share-online.biz/dl/YK5XOENMFE
and extract into your compile folder in the server.pbo
2. open system\server_cleanup.fsm in your server.pbo
find
Code://Check for hackers
and replace the line starting with
" if(vehicle _x != _x && !(vehicle _x in _safety)
with this line:
Code:" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n
3. open your system\server_monitor.sqf in your server.pbo and paste this at the end:
Code:nul = [ 6, //Number of the guaranteed Loot-Piles at the Crashside 3, //Number of the random Loot-Piles at the Crashside 3+(1,2,3 or 4) (50*60), //Fixed-Time (in seconds) between each start of a new Chopper (15*60), //Random time (in seconds) added between each start of a new Chopper 0.75, //Spawnchance of the Heli (1 will spawn all possible Choppers, 0.5 only 50% of them) 'center', //'center' Center-Marker for the Random-Crashpoints, for Chernarus this is a point near Stary 8000, // [106,[960.577,3480.34,0.002]]Radius in Meters from the Center-Marker in which the Choppers can crash and get waypoints true, //Should the spawned crashsite burn (at night) & have smoke? false, //Should the flames & smoke fade after a while? 2, //RANDOM WP 3, //GUARANTEED WP 1 //Amount of Damage the Heli has to get while in-air to explode before the POC. (0.0001 = Insta-Explode when any damage//bullethit, 1 = Only Explode when completly damaged) ] spawn server_spawnAN2;
4. open your init\server_functions.sqf in your server.pbo
find:
server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
paste this below:
Code:server_spawnAN2 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnAN2.sqf"; server_carepackagedrop = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_carepackagedrop.sqf";
========================================================
thats it.. i hope it works![]()