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.
// Settings
_amountWeapon = 2;
_amountAmmo = 4;
_amountFood = 4;
_amountTools = 1;
_refreshTime = 3600000; // Shouldn't refill until restart
_this allowDamage false;
// Loop forever
while {true} do
{
// Clear box
clearWeaponCargo _this;
clearMagazineCargo _this;
// Fill box
_this addMagazineCargo ["ItemSodaPepsi", _amountFood];
_this addMagazineCargo ["Arrow", _amountAmmo];
_this addWeaponCargo ["M24", _amountWeapon];
Do you know if the C130J_US_EP1, CH47_EP1_DZ, AN2_DZ and Mi17_Civilian_DZ classes work with this in Chernarus Epoch? Anyone Tested?
Talking about the fly over and care packages not crashing and creating a wreck.
Also the Care Packages, what is the object that is dropped?
Could it be a Random Chance Ammo Box/Crate with calls to a Fill Script?
http://dayzsuperhive.co.uk/arma-ii-ammo-boxes.html
From Lzryde Fill Ammo Box Script 0.2
Code:// Settings _amountWeapon = 2; _amountAmmo = 4; _amountFood = 4; _amountTools = 1; _refreshTime = 3600000; // Shouldn't refill until restart _this allowDamage false; // Loop forever while {true} do { // Clear box clearWeaponCargo _this; clearMagazineCargo _this; // Fill box _this addMagazineCargo ["ItemSodaPepsi", _amountFood]; _this addMagazineCargo ["Arrow", _amountAmmo]; _this addWeaponCargo ["M24", _amountWeapon];
etc etc..
Even setup a chance function to have a range of supplies spawning in 3 - 4 Crate Items.
Cheers,
Bungle
Coolthanks. Will try it out. So the crashmodel will be AN2_DZwreck or the same?
//Animated Helicrashs for DayZ 1.7.6.1
//Version 0.2
//Release Date: 05. April 2013
//Author: Grafzahl
//Thread-URL: http://opendayz.net/threads/animated-helicrashs-0-1-release.9084/
private["_useStatic","_crashDamage","_lootRadius","_preWaypoints","_preWaypointPos","_endTime","_startTime","_heliStart","_deadBody","_exploRange","_heliModel","_lootPos","_list","_craters","_dummy","_wp2","_wp3","_landingzone","_aigroup","_wp","_helipilot","_crash","_crashwreck","_smokerand","_staticcoords","_pos","_dir","_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName", "_aaa", "_blacklist"];
//_crashModel= _this select 0;
//_lootTable= _this select 1;
_guaranteedLoot = _this select 0;
_randomizedLoot = _this select 1;
_frequency= _this select 2;
_variance= _this select 3;
_spawnChance= _this select 4;
_spawnMarker= _this select 5;
_spawnRadius= _this select 6;
_spawnFire= _this select 7;
_fadeFire= _this select 8;
_randomizedWP= _this select 9;
_guaranteedWP= _this select 10;
_chutetype = "ParachuteMediumEast";
_boxtype = "Misc_cargo_cont_net1";
_useStatic = false;
if(count _this > 11) then {
_crashDamage = _this select 11;
} else {
_crashDamage = 1;
};
diag_log(format["PLANE: Starting spawn logic for animated AN2 Carepackage drops - written by Grafzahl, modded by fofinho [CD:%1]", _crashDamage]);
while {true} do {
_preWaypoints = 6;
private["_timeAdjust","_timeToSpawn","_spawnRoll","_crash","_hasAdjustment","_newHeight","_adjustedPos"];
// Allows the variance to act as +/- from the spawn frequency timer
_timeAdjust = round(random(_variance * 2) - _variance);
_timeToSpawn = time + _frequency + _timeAdjust;
//Random Heli-Type
_heliModel = "MV22";
//Random-Startpositions, Adjust this for other Maps then Chernarus
_heliStart = [[6993.7007,173.05298,300],[1623.715,218.18848,300]] call BIS_fnc_selectRandom;
_crashName= getText (configFile >> "CfgVehicles" >> _heliModel >> "displayName");
diag_log(format["PLANE: %1%2 chance to start a %3 Carepackagedrop at %4 with %5 drop points", round(_spawnChance * 100), '%', _crashName, _timeToSpawn, _preWaypoints]);
// Apprehensive about using one giant long sleep here given server time variances over the life of the server daemon
while {time < _timeToSpawn} do {
sleep 5;
};
_spawnRoll = random 1;
// Percentage roll
if (_spawnRoll <= _spawnChance) then {
//Spawn the AI-Heli flying in the air
_startTime = time;
_crashwreck = createVehicle [_heliModel,_heliStart, [], 0, "FLY"];
//Make sure its not destroyed by the Hacker-Killing-Cleanup (Thanks to Sarge for the hint)
_crashwreck setVariable["Sarge",1];
_crashwreck engineOn true;
_crashwreck flyInHeight 250;
_crashwreck forceSpeed 120;
_crashwreck setspeedmode "NORMAL";
/*
//Create an Invisibile Landingpad at the Crashside-Coordinates
_landingzone = createVehicle ["HeliHEmpty", [_position select 0, _position select 1], [], 0, "CAN_COLLIDE"];
_landingzone setVariable["Sarge",1];
*/
//Only a Woman could crash a Heli this way...
_aigroup = creategroup civilian;
_helipilot = _aigroup createUnit ["SurvivorW2_DZ",getPos _crashwreck,[],0,"FORM"];
_helipilot moveindriver _crashwreck;
_helipilot assignAsDriver _crashwreck;
sleep 0.5;
_unsorted = [];
for "_x" from 1 to _preWaypoints do {
_preWaypointPos = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,2000,0] call BIS_fnc_findSafePos;
_unsorted = _unsorted + [_preWaypointPos];
};
_sorted = [];
_pos = [800,2400];
{
_closest = _unsorted select 0;
{if ((_x distance _pos) <= (_closest distance _pos)) then {_closest = _x}} forEach _unsorted;
_sorted = _sorted + [_closest];
_helper = [];
_i=0;
while {!([_helper, _closest] call BIS_fnc_areEqual)} do {
_helper = _unsorted select _i;
_i=_i+1;
};
_unsorted set [(_i-1),"delete_me"];
_unsorted = _unsorted - ["delete_me"];
} forEach _unsorted;
diag_log(format["PLANE: %1 started flying from %2 to first waypoint NOW!(TIME:%3)", _crashName, str(_heliStart), round(time)]);
for "_x" from 0 to ((count _sorted)-1) do {
//_preWaypointPos = [_spawnMarker,0,8000,10,0,1000,0,_blacklist] call BIS_fnc_findSafePos;
diag_log(format["PLANE: Adding DROPWaypoint #%1 on %2", (_x+1),str(_sorted select _x)]);
_wp = _aigroup addWaypoint [(_sorted select _x), 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "CARELESS";
waituntil {(_crashwreck distance (_sorted select _x)) <= 1600 };
_crashwreck animate ["ramp_top",1]; //open the top part of the ramp
_crashwreck animate ["ramp_bottom",1]; //open the bottom part of the ramp
_crashwreck setVariable ["mv22_ramp", 1, true]; //set it open
_crashwreck LAND "GET IN";
_crashwreck forceSpeed 30;
sleep 5;
waituntil {(_crashwreck distance (_sorted select _x)) <= 600 || not alive _crashwreck || (getPosATL _crashwreck select 2) < 50 || (damage _crashwreck) >= _crashDamage };
diag_log(format["PLANE IS AT DROPWAYPOINT #%1 on %2", (_x+1),str(getpos _crashwreck)]);
sleep 3;
_flare = "F_40mm_White" createVehicle [getPos _crashwreck select 0, getPos _crashwreck select 1, (getPos _crashwreck select 2) +250];
_flare setVariable["Sarge",1];
nul = [_chutetype, _boxtype, _helistart, _crashwreck, _randomizedLoot, _guaranteedLoot] spawn server_carepackagedrop;
_crashwreck LAND "NONE";
_crashwreck flyInHeight 250;
_crashwreck forceSpeed 120;
sleep 5;
_crashwreck animate ["ramp_top",0]; //close the top part of the ramp
_crashwreck animate ["ramp_bottom",0]; //close the bottom part of the ramp
_crashwreck setVariable ["mv22_ramp", 0,true]; //set it closed
if (not alive _crashwreck || (damage _crashwreck) >= _crashDamage || (getPosATL _crashwreck select 2) < 5 ) exitWith {diag_log(format["DROPPED 1 LAST PACKAGE WHILE GETTING SHOT DOWN #%1 on %2", _x,str(getpos _crashwreck)]); };
};
_wp2 = _aigroup addWaypoint [_heliStart, 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointBehaviour "CARELESS";
diag_log(format["PLANE IS AT END WAYPOINT on %1",str(_heliStart)]);
waituntil {(_crashwreck distance _heliStart) <= 1000 || not alive _crashwreck || (getPosATL _crashwreck select 2) < 5 || (damage _crashwreck) >= _crashDamage};
sleep 5;
//Clean Up the Crashsite
deletevehicle _crashwreck;
deletevehicle _helipilot;
diag_log(format["PLANE DELETED"]);
_endTime = time - _startTime;
diag_log(format["PLANE: %2 Carepackagedrops completed! Runtime: %1 Seconds", round(_endTime), _preWaypoints]);
};
};
Cool will look at this later when i get chance , I did attempt it with a chinook for awhile but it kept blowing up, will have to lower the height it spawns in at