mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
1.7.5.D1216
This commit is contained in:
@@ -12,7 +12,8 @@ _position = [position _object,0,0,0,0,0,0,position player] call BIS_fnc_findSafe
|
||||
player playMove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon";
|
||||
waitUntil { animationState player != "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"};
|
||||
sleep 2;
|
||||
_object setpos _position;
|
||||
//_object setpos _position;
|
||||
_object setvectorup [0,0,1];
|
||||
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
sleep 3;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_item","_onLadder","_hasmeditem","_config","_text","_id"];
|
||||
private["_item"];
|
||||
_item = _this;
|
||||
call gear_ui_init;
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_playerPos","_canFill","_isPond","_isWell","_pondPos","_objectsWell","_onLadder","_hasbottleitem","_config","_item","_text","_objectsPond","_qty","_id"];
|
||||
private["_hasFood","_item","_text","_qty"];
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
|
||||
@@ -1,4 +1,112 @@
|
||||
class CfgVehicles {
|
||||
class Citizen1; // External class reference
|
||||
class zZombie_Base : Citizen1 {
|
||||
scope = public;
|
||||
glassesEnabled = 0;
|
||||
vehicleClass = "Zombie";
|
||||
displayName = "Zombie";
|
||||
fsmDanger = "";
|
||||
fsmFormation = "";
|
||||
zombieLoot = "civilian";
|
||||
moves = "CfgMovesZombie";
|
||||
isMan = false;
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
sensitivity = 4; // sensor sensitivity
|
||||
sensitivityEar = 2;
|
||||
identityTypes[] = {"zombie1", "zombie2"};
|
||||
class TalkTopics {};
|
||||
languages[] = {};
|
||||
|
||||
class Eventhandlers {
|
||||
init = "_this call zombie_initialize;";
|
||||
local = "if(_this select 1) then {[(position (_this select 0)),(_this select 0),true] execFSM '\z\AddOns\dayz_code\system\zombie_agent.fsm'};";
|
||||
};
|
||||
|
||||
class HitPoints {
|
||||
class HitHead {
|
||||
armor = 0.3;
|
||||
material = -1;
|
||||
name = "head_hit";
|
||||
passThrough = true;
|
||||
memoryPoint = "pilot";
|
||||
};
|
||||
|
||||
class HitBody : HitHead {
|
||||
armor = 2;
|
||||
name = "body";
|
||||
memoryPoint = "aimPoint";
|
||||
};
|
||||
|
||||
class HitSpine : HitHead {
|
||||
armor = 2;
|
||||
name = "Spine2";
|
||||
memoryPoint = "aimPoint";
|
||||
};
|
||||
|
||||
class HitHands : HitHead {
|
||||
armor = 0.5;
|
||||
material = -1;
|
||||
name = "hands";
|
||||
passThrough = true;
|
||||
};
|
||||
|
||||
class HitLArm : HitHands {
|
||||
name = "LeftArm";
|
||||
memoryPoint = "lelbow";
|
||||
};
|
||||
|
||||
class HitRArm : HitHands {
|
||||
name = "RightArm";
|
||||
memoryPoint = "relbow";
|
||||
};
|
||||
|
||||
class HitLForeArm : HitHands {
|
||||
name = "LeftForeArm";
|
||||
memoryPoint = "lwrist";
|
||||
};
|
||||
|
||||
class HitRForeArm : HitHands {
|
||||
name = "RightForeArm";
|
||||
memoryPoint = "rwrist";
|
||||
};
|
||||
|
||||
class HitLHand : HitHands {
|
||||
name = "LeftHand";
|
||||
memoryPoint = "LeftHandMiddle1";
|
||||
};
|
||||
|
||||
class HitRHand : HitHands {
|
||||
name = "RightHand";
|
||||
memoryPoint = "RightHandMiddle1";
|
||||
};
|
||||
|
||||
class HitLegs : HitHands {
|
||||
name = "legs";
|
||||
memoryPoint = "pelvis";
|
||||
};
|
||||
|
||||
class HitLLeg : HitHands {
|
||||
name = "LeftLeg";
|
||||
memoryPoint = "lknee";
|
||||
};
|
||||
|
||||
class HitLLegUp : HitHands {
|
||||
name = "LeftUpLeg";
|
||||
memoryPoint = "lfemur";
|
||||
};
|
||||
|
||||
class HitRLeg : HitHands {
|
||||
name = "RightLeg";
|
||||
memoryPoint = "rknee";
|
||||
};
|
||||
|
||||
class HitRLegUp : HitHands {
|
||||
name = "RightUpLeg";
|
||||
memoryPoint = "rfemur";
|
||||
};
|
||||
};
|
||||
};
|
||||
class AllVehicles;
|
||||
class Air : AllVehicles
|
||||
{
|
||||
@@ -37,11 +145,11 @@ class CfgVehicles {
|
||||
|
||||
class Mi17_DZ: Mi17_base
|
||||
{
|
||||
displayName = "Mi17_DZ";
|
||||
displayname = "Mi-8M";
|
||||
displaynameshort = "Mi17_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
maxSpeed = 180; // max speed on level road, km/h
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
@@ -49,6 +157,9 @@ class CfgVehicles {
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
transportMaxWeapons = 10;
|
||||
transportMaxMagazines = 50;
|
||||
transportmaxbackpacks = 10;
|
||||
|
||||
class Turrets : Turrets
|
||||
{
|
||||
@@ -91,6 +202,9 @@ class CfgVehicles {
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
transportMaxWeapons = 5;
|
||||
transportMaxMagazines = 25;
|
||||
transportmaxbackpacks = 4;
|
||||
|
||||
class Turrets : Turrets
|
||||
{
|
||||
@@ -104,7 +218,65 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class AH6_Base_EP1;
|
||||
//class AH6X_EP1: AH6_Base_EP1 {};
|
||||
class AH6X_DZ: AH6_Base_EP1
|
||||
{
|
||||
displayname = "AH6X Little Bird";
|
||||
displaynameshort = "AH6X_DZ";
|
||||
audible = 6;
|
||||
enablemanualfire = 0;
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenselections[] = {"camo1"};
|
||||
hiddenselectionstextures[] = {"ca\air_e\ah6j\data\ah6_merge1_co.paa"};
|
||||
icon = "\ca\air_e\data\UI\Icon_ah6x_CA.paa";
|
||||
model = "\ca\air_e\ah6j\ah6x";
|
||||
picture = "\ca\air_e\data\UI\Picture_ah6x_CA.paa";
|
||||
isuav = 0;
|
||||
radartype = 0;
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
transportMaxWeapons = 3;
|
||||
transportMaxMagazines = 10;
|
||||
transportmaxbackpacks = 2;
|
||||
class Turrets {};
|
||||
};
|
||||
class MH6J_DZ: AH6_Base_EP1
|
||||
{
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
enablemanualfire = 0;
|
||||
typicalCargo[] = {};
|
||||
displayname = "MH-6J Little Bird";
|
||||
displaynameshort = "MH6J_DZ";
|
||||
hiddenselections[] = {"camo1", "camo2"};
|
||||
transportsoldier = 5;
|
||||
hiddenselectionstextures[] = {"ca\air_e\ah6j\data\ah6_merge1_co.paa", "ca\air_e\ah6j\data\default_co.paa"};
|
||||
icon = "\ca\air_e\data\UI\Icon_mh6j_CA.paa";
|
||||
model = "\ca\air_e\ah6j\mh6j";
|
||||
picture = "\ca\air_e\data\UI\Picture_mh6j_CA.paa";
|
||||
radartype = 0;
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
transportMaxWeapons = 3;
|
||||
transportMaxMagazines = 20;
|
||||
transportmaxbackpacks = 5;
|
||||
class Turrets {};
|
||||
};
|
||||
class Animal;
|
||||
class Pastor;
|
||||
class Fin;
|
||||
@@ -341,6 +513,17 @@ class CfgVehicles {
|
||||
canHideBodies = 1;
|
||||
};
|
||||
class Bag_Base_EP1;
|
||||
class CZ_VestPouch_EP1: Bag_Base_EP1
|
||||
{
|
||||
displayname = "Czech Vest Pouch";
|
||||
icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa";
|
||||
mapsize = 2;
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_acr_small.p3d";
|
||||
picture = "\ca\weapons_e\data\icons\backpack_ACR_small_CA.paa";
|
||||
scope = 2;
|
||||
transportmaxmagazines = 12;
|
||||
transportmaxweapons = 0;
|
||||
};
|
||||
class DZ_Patrol_Pack_EP1: Bag_Base_EP1
|
||||
{
|
||||
scope = 2;
|
||||
@@ -400,32 +583,8 @@ class CfgVehicles {
|
||||
class An2_Base_EP1;
|
||||
class AN2_DZ: An2_Base_EP1
|
||||
{
|
||||
displayName = "AN2_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
};
|
||||
//AH6X_EP1
|
||||
class AH6X_EP1
|
||||
{
|
||||
scope = 0;
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
};
|
||||
class AH6X_DZ: AH6X_EP1
|
||||
{
|
||||
displayName = "AH6X_DZ";
|
||||
displayname = "AN2 Cargo Plane";
|
||||
displaynameshort = "AN2_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
@@ -439,6 +598,9 @@ class CfgVehicles {
|
||||
commanderCanSee = 2+16+32;
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
transportMaxWeapons = 10;
|
||||
transportMaxMagazines = 80;
|
||||
transportmaxbackpacks = 15;
|
||||
};
|
||||
class House {
|
||||
class DestructionEffects;
|
||||
@@ -455,7 +617,14 @@ class CfgVehicles {
|
||||
displayName = "Crashed UH-1Y";
|
||||
vehicleClass = "Wrecks";
|
||||
};
|
||||
|
||||
class UH60Wreck_DZ: SpawnableWreck
|
||||
{
|
||||
model = "\Ca\Misc_E\Wreck_UH60_EP1.p3d";
|
||||
icon = "ca\Misc_E\data\Icons\Icon_uh60_wreck_CA";
|
||||
mapSize = 15;
|
||||
displayName = "UH-60 Wreck";
|
||||
vehicleClass = "Wrecks";
|
||||
};
|
||||
class Strategic;
|
||||
class NonStrategic;
|
||||
|
||||
|
||||
@@ -1,37 +1,41 @@
|
||||
private["_serial","_positions","_min","_lootGroup","_iArray","_iItem","_iClass","_iPos","_item","_mags","_qty","_max","_tQty","_canType","_obj","_type","_nearBy","_clean","_unitTypes","_max","_isNoone","_config","_num","_originalPos","_zombieChance","_rnd","_fastRun"];
|
||||
_obj = _this select 0;
|
||||
private["_obj","_type","_config","_canLoot","_originalPos","_unitTypes","_min","_max","_num","_clean","_positions","_zombieChance","_rnd","_iPos","_nearBy","_nearByPlayer"];_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
_canLoot = isClass (_config);
|
||||
_originalPos = getPosATL _obj;
|
||||
|
||||
if (_canLoot) then {
|
||||
//Get zombie class
|
||||
_unitTypes = getArray (_config >> "zombieClass");
|
||||
_min = getNumber (_config >> "minRoaming");
|
||||
_max = getNumber (_config >> "maxRoaming");
|
||||
_min = getNumber (_config >> "maxRoaming");
|
||||
_max = getNumber (_config >> "minRoaming");
|
||||
//Walking Zombies
|
||||
_num = round(random _max) max _min; // + round(_max / 3);
|
||||
diag_log ("Class: " + _type + " / Zombies: " + str(_unitTypes) + " / Walking: " + str(_num));
|
||||
|
||||
//diag_log ("Class: " + _type + " / Zombies: " + str(_unitTypes) + " / Walking: " + str(_num));
|
||||
for "_i" from 1 to _num do
|
||||
{
|
||||
[_originalPos,true,_unitTypes] call zombie_generate;
|
||||
[_originalPos,_unitTypes] call zombie_generate;
|
||||
};
|
||||
|
||||
//Add Internal Zombies
|
||||
_clean = count ((getPosATL _obj) nearEntities ["zZombie_Base",(sizeOf _type)]) == 0;
|
||||
if (_clean) then {
|
||||
_positions = getArray (_config >> "lootPos");
|
||||
_zombieChance = getNumber (_config >> "zombieChance");
|
||||
diag_log format["Building: %1 / Positions: %2 / Chance: %3",_type,_positions,_zombieChance];
|
||||
//diag_log format["Building: %1 / Positions: %2 / Chance: %3",_type,_positions,_zombieChance];
|
||||
{
|
||||
_rnd = random 1;
|
||||
if (_rnd < _zombieChance) then {
|
||||
_iPos = _obj modelToWorld _x;
|
||||
//_iPos = [_iPos,0,20,20,0,0,0] call BIS_fnc_findSafePos;
|
||||
//_iPos = position (_obj);
|
||||
_nearBy = count nearestObjects [_iPos, ["zZombie_Base"],1] > 0;
|
||||
_nearByPlayer = ({isPlayer _x} count (_iPos nearEntities ["CAManBase",30])) > 0;
|
||||
//diag_log ("BUILDING: " + _type + " / " + str(_nearBy) + " / " + str(_nearByPlayer));
|
||||
|
||||
if (!_nearByPlayer and !_nearBy) then {
|
||||
[_iPos,false,_unitTypes] call zombie_generate;
|
||||
[_iPos,_unitTypes] call zombie_generate;
|
||||
};
|
||||
};
|
||||
} forEach _positions;
|
||||
|
||||
@@ -46,16 +46,6 @@ if (_isPlayer) then {
|
||||
if (_unit == player) then {
|
||||
if (_hit == "") then {
|
||||
if ((_source != player) and _isPlayer) then {
|
||||
//Dog defends player if within 50meters
|
||||
_listTalk = _pos nearEntities [["DZ_Fin, DZ_Pastor"], 100];
|
||||
{
|
||||
if (_x getVariable ["characterID", "0"] == dayz_characterID) then {
|
||||
_targets = _x getVariable ["targets",[]];
|
||||
_targets set [count _targets, _source];
|
||||
_x setVariable ["targets", _targets, true];
|
||||
};
|
||||
}foreach _listTalk;
|
||||
|
||||
//Enable aggressor Actions
|
||||
if (_source isKindOf "CAManBase") then {
|
||||
_source setVariable["startcombattimer",1];
|
||||
|
||||
@@ -19,7 +19,7 @@ Missing:
|
||||
*/
|
||||
|
||||
|
||||
private["_looptime","_vehicle_factor","_moving_factor","_fire_factor","_rain_factor","_night_factor","_wind_factor","_building_factor","_sun_factor","_water_factor","_difference","_hasfireffect","_isinbuilding","_isinvehicle","_raining","_sunrise","_vel","_speed","_fireplaces","_building","_daytime","_height_mod","_temp"];
|
||||
private ["_looptime","_sun_factor","_building_factor","_vehicle_factor","_fire_factor","_water_factor","_rain_factor","_night_factor","_wind_factor","_height_mod","_difference","_hasfireffect","_isinbuilding","_isinvehicle","_raining","_sunrise","_building"];
|
||||
|
||||
_looptime = _this;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ _num = switch (_type) do {
|
||||
case "dog_qq": {2};
|
||||
};
|
||||
|
||||
if (_type in ["shout","hit","attack","scream","breath"]) then {
|
||||
if (_type in ["shout","hit","attack","scream","breath","spotted"]) then {
|
||||
_dis = 100;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_unit","_distance","_doRun","_pos","_listTalk","_zombie","_targets","_dog"];
|
||||
private["_unit","_distance","_i","_listTalk","_zombie","_targets","_pos"];
|
||||
//Alert Zed's to noise of shot
|
||||
_unit = _this select 0;
|
||||
_distance = _this select 1;
|
||||
|
||||
@@ -30,7 +30,6 @@ if (count _list < dayz_maxAnimals) then {
|
||||
|
||||
_root = configFile >> "CfgVehicles" >> _type;
|
||||
_favouritezones = getText ( _root >> "favouritezones");
|
||||
|
||||
//_randrefpoint = [position player, 10, dayz_animalDistance, 1, 0, 50, 0] call BIS_fnc_findSafePos;
|
||||
_randrefpoint = getposATL player;
|
||||
_PosList = selectbestplaces [_randrefpoint,dayz_animalDistance,_favouritezones,10,5];
|
||||
@@ -45,21 +44,4 @@ if (count _list < dayz_maxAnimals) then {
|
||||
_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
||||
};
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
//Comment out above code and use code below for testing
|
||||
/*
|
||||
private["_type","_pos","_agent","_id"];
|
||||
_near = (position player) nearEntities ["DZ_Pastor",500];
|
||||
|
||||
if (count _near == 0) then {
|
||||
_type = "DZ_Pastor";
|
||||
_pos = player modelToWorld [0,(count _near) + 1,0];
|
||||
_agent = createAgent [_type, _pos, [], 0, "NONE"];
|
||||
player reveal _agent;
|
||||
_agent setpos _pos;
|
||||
//_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
||||
_id = 1;
|
||||
_agent setVariable ["fsm_handle", _id];
|
||||
};
|
||||
*/
|
||||
};
|
||||
18
dayz_code/compile/player_combatCheck.sqf
Normal file
18
dayz_code/compile/player_combatCheck.sqf
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Initial Idea by Daimyo
|
||||
|
||||
System test to see how this would handle in the game. Other systems will be brought in to play along side this if full permission is givin.
|
||||
For now this is just a test system based on the idea.
|
||||
*/
|
||||
|
||||
private["_dialog","_dangerNear","_inCombat","_inVehicle"];
|
||||
|
||||
_inCombat = player getVariable["startcombattimer",0];
|
||||
_inVehicle = (vehicle player != player);
|
||||
_dangerNear = (getPosATL player) nearEntities [["zZombie_Base","CAManBase"],30];
|
||||
|
||||
if (_inVehicle && (speed player != 0)) exitwith {};
|
||||
|
||||
if (count _dangerNear > 1) then {
|
||||
player setVariable["startcombattimer", 1, true];
|
||||
};
|
||||
@@ -126,6 +126,9 @@ terminate dayz_animalCheck;
|
||||
terminate dayz_monitor1;
|
||||
terminate dayz_medicalH;
|
||||
terminate dayz_gui;
|
||||
terminate dayz_zedCheck;
|
||||
terminate dayz_locationCheck;
|
||||
terminate dayz_combatCheck;
|
||||
|
||||
//Reset (just in case)
|
||||
//deleteVehicle dayz_playerTrigger;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_unit","_weapon","_ammo","_projectile","_audible","_caliber","_distance","_i","_listTalk","_group","_targets","_id"];
|
||||
private["_unit","_ammo","_audible","_distance","_listTalk","_weapon"];
|
||||
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
private["_objects","_dialog","_magazineArray","_control","_i","_item","_val","_max"];
|
||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage","VaultStorage"], 10];
|
||||
private ["_objects"];
|
||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
|
||||
{
|
||||
dayzUpdateVehicle = [_x,"all"];
|
||||
dayzUpdateVehicle = [_x,"gear"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
} foreach _objects;
|
||||
|
||||
private["_dialog","_magazineArray","_control","_item","_val","_max"];
|
||||
|
||||
disableSerialization;
|
||||
_dialog = _this select 0;
|
||||
_magazineArray = [];
|
||||
|
||||
@@ -15,7 +15,7 @@ dayz_inVehicle = _inVehicle;
|
||||
//if (((time - dayz_spawnWait) < dayz_spawnDelay) or ((time - dayz_lootWait) < dayz_lootDelay)) exitWith {diag_log("Skipping Check since neither loot or zombies are ready");};
|
||||
//if (((time - dayz_spawnWait) < dayz_spawnDelay) and ((time - dayz_lootWait) < dayz_lootDelay)) exitWith {};
|
||||
|
||||
diag_log("SPAWN CHECKING: Starting");
|
||||
//diag_log("SPAWN CHECKING: Starting");
|
||||
_radius = 300;
|
||||
_locationstypes = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
|
||||
_nearestCity = nearestLocations [getPos player, _locationstypes, _radius];
|
||||
@@ -29,40 +29,41 @@ if ((count _nearestCity) > 0) then {
|
||||
};
|
||||
|
||||
_nearbytype = type (_nearestCity select 0);
|
||||
_nearby = _position nearObjects ["Building",_radius];
|
||||
|
||||
switch (_nearbytype) do {
|
||||
default {
|
||||
_maxZombies = 20;
|
||||
case "Hill": {
|
||||
_radius = 50;
|
||||
_maxZombies = 30;
|
||||
};
|
||||
case "NameLocal": {
|
||||
_radius = 100;
|
||||
_maxZombies = 40;
|
||||
};
|
||||
case "NameVillage": {
|
||||
_radius = 150;
|
||||
_maxZombies = 60;
|
||||
};
|
||||
case "NameCity": {
|
||||
_radius = 200;
|
||||
_maxZombies = 80;
|
||||
};
|
||||
case "NameCityCapital": {
|
||||
_radius = 300;
|
||||
_maxZombies = 100;
|
||||
};
|
||||
default {
|
||||
_radius = 100;
|
||||
_maxZombies = 40;
|
||||
};
|
||||
};
|
||||
|
||||
//diag_log ("nearbytype: " +str(_nearbytype));
|
||||
_nearby = _position nearObjects ["Building",_radius];
|
||||
|
||||
if (_inVehicle) then {
|
||||
_maxZombies = _maxZombies / 2;
|
||||
};
|
||||
|
||||
_age = 0;
|
||||
_tooManyZs = count (_position nearEntities ["zZombie_Base",200]) > _maxZombies;
|
||||
//diag_log("Too Many Zeds: " +str(_tooManyZs));
|
||||
//diag_log(format["SPAWN CHECK: Building count is %1", count _nearby]);
|
||||
_count = ({alive _x} count allMissionObjects "zZombie_Base");
|
||||
//hint "Total Zeds: " +str(_count));
|
||||
//hint format["Total Zeds %1",_count];
|
||||
diag_log ("Total Zeds: " +str(_count));
|
||||
_tooManyZs = count (_position nearEntities ["zZombie_Base",_radius * 2]) > _maxZombies;
|
||||
{
|
||||
//diag_log("SPAWN CHECK: Start of Loop");
|
||||
_type = typeOf _x;
|
||||
@@ -88,6 +89,7 @@ if (_inVehicle) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if (_canZombie) then {
|
||||
if (dayz_spawnZombies < _maxZombies) then {
|
||||
if (!_tooManyZs) then {
|
||||
@@ -107,9 +109,6 @@ if (_inVehicle) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
//} else {
|
||||
//dayz_spawnWait = time;
|
||||
//dayz_spawnZombies = 0;
|
||||
};
|
||||
};
|
||||
} forEach _nearby;
|
||||
@@ -1,3 +1,4 @@
|
||||
private["_isAir","_inVehicle","_dateNow","_age","_radius","_locationstypes","_nearestCity","_position","_nearby","_type","_config","_canZombie","_canLoot","_dis","_keepAwayDist","_isNoone","_looted","_cleared"];
|
||||
_isAir = vehicle player iskindof "Air";
|
||||
_inVehicle = (vehicle player != player);
|
||||
_dateNow = (DateToNumber date);
|
||||
|
||||
93
dayz_code/compile/player_spawnzedCheck.sqf
Normal file
93
dayz_code/compile/player_spawnzedCheck.sqf
Normal file
@@ -0,0 +1,93 @@
|
||||
private["_isAir","_inVehicle","_dateNow","_maxZombies","_spawnDelay","_age","_radius","_locationstypes","_nearestCity","_position","_nearbytype","_tooManyZs","_nearbyplayer","_type","_config","_canZombie","_dis","_zombied","_bPos","_zombiesNum","_withinRange"];
|
||||
|
||||
_isAir = vehicle player iskindof "Air";
|
||||
_inVehicle = (vehicle player != player);
|
||||
_dateNow = (DateToNumber date);
|
||||
_maxZombies = dayz_maxLocalZombies;
|
||||
_age = -1;
|
||||
|
||||
// If they just got out of a vehicle, boost their per-player zombie limit by 5 in hopes of allowing insta-spawn zombies
|
||||
if (dayz_inVehicle and !_inVehicle) then {
|
||||
dayz_spawnWait = -300;
|
||||
//_maxZombies = _maxZombies + 2;
|
||||
};
|
||||
dayz_inVehicle = _inVehicle;
|
||||
|
||||
|
||||
//diag_log("SPAWN CHECKING: Starting");
|
||||
_radius = 300;
|
||||
_locationstypes = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
|
||||
_nearestCity = nearestLocations [getPos player, _locationstypes, _radius];
|
||||
|
||||
_position = getPosATL player;
|
||||
if ((count _nearestCity) > 0) then {
|
||||
_position = position (_nearestCity select 0);
|
||||
};
|
||||
|
||||
|
||||
_nearbytype = type (_nearestCity select 0);
|
||||
|
||||
switch (_nearbytype) do {
|
||||
case "NameLocal": {
|
||||
_radius = 200;
|
||||
_maxZombies = 30;
|
||||
};
|
||||
case "NameVillage": {
|
||||
_radius = 250;
|
||||
_maxZombies = 40;
|
||||
};
|
||||
case "NameCity": {
|
||||
_radius = 300;
|
||||
_maxZombies = 45;
|
||||
};
|
||||
case "NameCityCapital": {
|
||||
_radius = 400;
|
||||
_maxZombies = 50;
|
||||
};
|
||||
default {
|
||||
_radius = 180;
|
||||
_maxZombies = 20;
|
||||
};
|
||||
};
|
||||
if (_inVehicle) then {
|
||||
_maxZombies = _maxZombies / 2;
|
||||
};
|
||||
|
||||
_tooManyZs = count (_position nearEntities ["zZombie_Base",_radius]) > _maxZombies;
|
||||
_nearby = nearestObjects [player, ["Building"], _radius];
|
||||
//_nearby = _position nearObjects ["building",_radius];
|
||||
{
|
||||
_type = typeOf _x;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
_canZombie = isClass (_config);
|
||||
_dis = _x distance player;
|
||||
|
||||
if (_canZombie) then {
|
||||
//if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
|
||||
if (dayz_spawnZombies < _maxZombies) then {
|
||||
if (!_tooManyZs) then {
|
||||
private["_zombied"];
|
||||
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _zombied) * 525948;
|
||||
//diag_log(format["Date: %1 | ZombieSpawn: %2 | age: %3 | building: %4 (%5)", _dateNow, _zombied, _age, str(_x), _dis]);
|
||||
if (_age > 1) then {
|
||||
_bPos = getPosATL _x;
|
||||
_zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]);
|
||||
_withinRange = _x distance player < _radius;
|
||||
//diag_log ("ZombiesNum: " +str(_zombiesNum));
|
||||
if ((_zombiesNum == 0) and _withinRange) then {
|
||||
//if (_zombiesNum == 0) then {
|
||||
//Randomize Zombies
|
||||
_x setVariable ["zombieSpawn",_dateNow,true];
|
||||
[_x] call building_spawnZombies;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
dayz_spawnWait = time;
|
||||
dayz_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius]);
|
||||
};
|
||||
};
|
||||
} forEach _nearby;
|
||||
_running = 0
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_foodVal","_thirstVal","_tempVal","_combatVal","_array","_display","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_ctrlTemp","_ctrlEar","_ctrlEye","_ctrlHumanity","_ctrlCombat","_ctrlFracture","_bloodLvl","_thirstLvl","_foodLvl","_blood","_thirst","_food","_temp","_tempImg","_tempLvl","_ca","_visualtext","_visual","_audibletext","_audible","_humanity","_guiHumanity","_humanityText"];
|
||||
private["_display","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye"/*,"_ctrlHumanity"*/,"_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible"];
|
||||
disableSerialization;
|
||||
|
||||
_foodVal = 1 - (dayz_hunger / SleepFood);
|
||||
@@ -62,7 +62,10 @@ if (_bloodLvl <= 0) then {
|
||||
_blood = "\z\addons\dayz_code\gui\status_blood_inside_" + str(_bloodLvl) + "_ca.paa";
|
||||
};
|
||||
|
||||
if (_thirstLvl < 0) then { _thirstLvl = 0 };
|
||||
_thirst = "\z\addons\dayz_code\gui\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa";
|
||||
|
||||
if (_foodLvl < 0) then { _foodLvl = 0 };
|
||||
_food = "\z\addons\dayz_code\gui\status_food_inside_" + str(_foodLvl) + "_ca.paa";
|
||||
|
||||
if ( _tempLvl >= 36 ) then { _tempImg = 4 };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
|
||||
private["_unit","_firer","_distance","_weapon","_ammo","_killerID","_handled","_arc","_isBallistic","_dmgDistance","_isRocket","_isPlayer","_inVehicle","_evType","_recordable","_turretDir","_weaponDir","_pos1","_pos2","_facing","_firingArc","_isInFront","_isInRear","_id"];
|
||||
private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","_result","_evType","_recordable","_inVehicle","_isPlayer","_isRocket","_dmgDistance","_isBallistic","_handled"];
|
||||
//Init
|
||||
//[unit, firer, distance, weapon, muzzle, mode, ammo]
|
||||
_unit = _this select 0;
|
||||
|
||||
@@ -1,32 +1,21 @@
|
||||
private["_isZombie","_unit","_vehicle","_targets","_move","_rnd","_wound","_type","_dir","_hpList","_hp","_damage","_chance","_strH","_dam","_total","_result","_tPos","_zPos","_inAngle","_cantSee","_isZombieInside","_building","_isPlayerInside"];
|
||||
_unit = _this;
|
||||
private["_unit","_targets","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_result","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
|
||||
_unit = _this select 0;
|
||||
_type = _this select 1;
|
||||
_vehicle = (vehicle player);
|
||||
|
||||
_isZombie = _unit isKindOf "zZombie_base";
|
||||
if(_isZombie) then {
|
||||
_type = "zombie";
|
||||
} else {
|
||||
_type = "dog";
|
||||
};
|
||||
|
||||
_targets = _unit getVariable ["targets",[]];
|
||||
//if (!(_vehicle in _targets)) exitWith {};
|
||||
|
||||
//Do the attack
|
||||
_move = "ZombieStandingAttack1";
|
||||
_rnd = 0;
|
||||
_wound = "";
|
||||
if (r_player_unconscious && _vehicle == player) then {
|
||||
_unit doMove (getPos player);
|
||||
if (r_player_unconscious && _vehicle == player && _type == "zombie") then {
|
||||
_rnd = round(random 4) + 1;
|
||||
_move = "ZombieFeed" + str(_rnd);
|
||||
} else {
|
||||
_unit doMove (getPos player);
|
||||
if (_type == "dog") then {
|
||||
_move = "Dog_Attack";
|
||||
} else {
|
||||
if (_type == "zombie") then {
|
||||
_rnd = round(random 9) + 1;
|
||||
_move = "ZombieStandingAttack" + str(_rnd);
|
||||
} else {
|
||||
_move = "Dog_Attack";
|
||||
};
|
||||
};
|
||||
_dir = [_unit,player] call BIS_Fnc_dirTo;
|
||||
@@ -59,9 +48,15 @@ if (_vehicle != player) then {
|
||||
if ((_vehicle isKindOf "ATV_Base_EP1") or (_vehicle isKindOf "Motorcycle")) then { player action ["eject", _vehicle] };
|
||||
};
|
||||
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
|
||||
_wound = DAYZ_woundHit call BIS_fnc_selectRandomWeighted;
|
||||
} else {
|
||||
_wound = DAYZ_woundHit_ok call BIS_fnc_selectRandomWeighted;
|
||||
_cnt = count (DAYZ_woundHit select 1);
|
||||
_index = floor (random _cnt);
|
||||
_index = (DAYZ_woundHit select 1) select _index;
|
||||
_wound = (DAYZ_woundHit select 0) select _index;
|
||||
} else {
|
||||
_cnt = count (DAYZ_woundHit_ok select 1);
|
||||
_index = floor (random _cnt);
|
||||
_index = (DAYZ_woundHit_ok select 1) select _index;
|
||||
_wound = (DAYZ_woundHit_ok select 0) select _index;
|
||||
};
|
||||
_damage = 0.1 + random (1.2);
|
||||
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
||||
@@ -88,13 +83,22 @@ if (_vehicle != player) then {
|
||||
_cantSee = [_unit,_vehicle] call dayz_losCheck;
|
||||
if (!_cantSee) then {
|
||||
if (_type == "dog") then {
|
||||
_wound = DAYZ_woundHit_dog call BIS_fnc_selectRandomWeighted;
|
||||
_cnt = count (DAYZ_woundHit_dog select 1);
|
||||
_index = floor (random _cnt);
|
||||
_index = (DAYZ_woundHit_dog select 1) select _index;
|
||||
_wound = (DAYZ_woundHit_dog select 0) select _index;
|
||||
_damage = 0.3 + random (1.0);
|
||||
} else {
|
||||
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
|
||||
_wound = DAYZ_woundHit call BIS_fnc_selectRandomWeighted;
|
||||
_cnt = count (DAYZ_woundHit select 1);
|
||||
_index = floor (random _cnt);
|
||||
_index = (DAYZ_woundHit select 1) select _index;
|
||||
_wound = (DAYZ_woundHit select 0) select _index;
|
||||
} else {
|
||||
_wound = DAYZ_woundHit_ok call BIS_fnc_selectRandomWeighted;
|
||||
_cnt = count (DAYZ_woundHit_ok select 1);
|
||||
_index = floor (random _cnt);
|
||||
_index = (DAYZ_woundHit_ok select 1) select _index;
|
||||
_wound = (DAYZ_woundHit_ok select 0) select _index;
|
||||
};
|
||||
_damage = 0.1 + random (1.2);
|
||||
};
|
||||
@@ -103,7 +107,7 @@ if (_vehicle != player) then {
|
||||
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
|
||||
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
|
||||
//publicVariable "dayzHit";
|
||||
if (_type == "dog") then { [_unit,"dog_growl",0,false] call dayz_zombieSpeak; } else { [_unit,"hit",0,false] call dayz_zombieSpeak; };
|
||||
[_unit,"hit",0,false] call dayz_zombieSpeak;
|
||||
} else {
|
||||
/*
|
||||
_isZombieInside = [_unit,_building] call fnc_isInsideBuilding;
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
private["_listTalk","_isZombie","_group","_eyeDir","_attacked","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"];
|
||||
private["_listTalk","_isZombie","_group","_eyeDir","_attacked","_continue","_type","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"];
|
||||
_refObj = vehicle player;
|
||||
//_listTalk = (position _refObj) nearEntities ["zZombie_Base",200];
|
||||
_listTalk = (position _refObj) nearEntities ["zZombie_Base",100];
|
||||
_listTalk = (position _refObj) nearEntities [["zZombie_Base","DZ_Pastor"],80];
|
||||
_pHeight = (getPosATL _refObj) select 2;
|
||||
_attacked = false;
|
||||
_multiplier = 1;
|
||||
|
||||
//_list = list dayz_playerTrigger;
|
||||
{
|
||||
_continue = true;
|
||||
|
||||
@@ -23,16 +21,8 @@ _multiplier = 1;
|
||||
private["_dist"];
|
||||
_dist = (_x distance _refObj);
|
||||
_group = _x;
|
||||
/*
|
||||
_group = group _x;
|
||||
_chance = (count units _group);
|
||||
if (isNull group _x) then {
|
||||
_group = _x;
|
||||
|
||||
_chance = 1;
|
||||
};
|
||||
*/
|
||||
_chance = 1;
|
||||
//if ((_x in _list) and !(animationState _x == "ZombieFeed")) then {
|
||||
if ((_x distance player < dayz_areaAffect) and !(animationState _x == "ZombieFeed")) then {
|
||||
if (_type == "zombie") then { [_x,"attack",(_chance),true] call dayz_zombieSpeak; };
|
||||
//perform an attack
|
||||
@@ -40,11 +30,8 @@ _multiplier = 1;
|
||||
_entHeight = (getPosATL _x) select 2;
|
||||
_delta = _pHeight - _entHeight;
|
||||
if ( ((time - _last) > 1) and ((_delta < 1.5) and (_delta > -1.5)) ) then {
|
||||
//_isZInside = [_x,_building] call fnc_isInsideBuilding;
|
||||
//if ((_isPlayerInside and _isZInside) or (!_isPlayerInside and !_isZInside)) then {
|
||||
_x spawn player_zombieAttack;
|
||||
[_x, _type] spawn player_zombieAttack;
|
||||
_x setVariable["lastAttack",time];
|
||||
//};
|
||||
};
|
||||
_attacked = true;
|
||||
} else {
|
||||
@@ -59,12 +46,12 @@ _multiplier = 1;
|
||||
//Noise Activation
|
||||
_targets = _group getVariable ["targets",[]];
|
||||
if (!(_refObj in _targets)) then {
|
||||
if (_dist < DAYZ_disAudial) then {
|
||||
if (DAYZ_disAudial > 80) then {
|
||||
if (_dist < (DAYZ_disAudial * _multiplier)) then {
|
||||
if ((DAYZ_disAudial * _multiplier) > 80) then {
|
||||
_targets set [count _targets, driver _refObj];
|
||||
_group setVariable ["targets",_targets,true];
|
||||
} else {
|
||||
_chance = [_x,_dist,DAYZ_disAudial] call dayz_losChance;
|
||||
_chance = [_x,_dist,(DAYZ_disAudial * _multiplier)] call dayz_losChance;
|
||||
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
|
||||
if ((random 1) < _chance) then {
|
||||
_cantSee = [_x,_refObj] call dayz_losCheck;
|
||||
@@ -72,7 +59,7 @@ _multiplier = 1;
|
||||
_targets set [count _targets, driver _refObj];
|
||||
_group setVariable ["targets",_targets,true];
|
||||
} else {
|
||||
if (_dist < (DAYZ_disAudial / 2)) then {
|
||||
if (_dist < ((DAYZ_disAudial * _multiplier) / 2)) then {
|
||||
_targets set [count _targets, driver _refObj];
|
||||
_group setVariable ["targets",_targets,true];
|
||||
};
|
||||
@@ -84,8 +71,8 @@ _multiplier = 1;
|
||||
//Sight Activation
|
||||
_targets = _group getVariable ["targets",[]];
|
||||
if (!(_refObj in _targets)) then {
|
||||
if (_dist < DAYZ_disVisual) then {
|
||||
_chance = [_x,_dist,DAYZ_disVisual] call dayz_losChance;
|
||||
if (_dist < (DAYZ_disVisual * _multiplier)) then {
|
||||
_chance = [_x,_dist,(DAYZ_disVisual * _multiplier)] call dayz_losChance;
|
||||
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
|
||||
if ((random 1) < _chance) then {
|
||||
//diag_log ("Chance Detection");
|
||||
@@ -93,7 +80,7 @@ _multiplier = 1;
|
||||
_zPos = (getPosASL _x);
|
||||
//_eyeDir = _x call dayz_eyeDir;
|
||||
_eyeDir = direction _x;
|
||||
_inAngle = [_zPos,_eyeDir,30,_tPos] call fnc_inAngleSector;
|
||||
_inAngle = [_zPos,_eyeDir,(30 * _multiplier),_tPos] call fnc_inAngleSector;
|
||||
if (_inAngle) then {
|
||||
//diag_log ("In Angle");
|
||||
//LOS check
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_group","_target","_lead","_targetMen","_targetDis","_range","_assigned","_targets","_obj","_dis","_fires","_rnd","_man","_manDis","_c"];
|
||||
private["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_leadheight","_nearEnts","_rnd","_assigned"];
|
||||
_group = _this;
|
||||
_target = objNull;
|
||||
_lead = leader _group;
|
||||
|
||||
@@ -7,7 +7,6 @@ _range = 300;
|
||||
_manDis = 0;
|
||||
|
||||
_targets = _agent getVariable ["targets",[]];
|
||||
/*
|
||||
//Search for fires
|
||||
if (count _targets == 0) then {
|
||||
_fires = nearestObjects [_agent,["Land_Fire"],_range];
|
||||
@@ -21,11 +20,11 @@ if (count _targets == 0) then {
|
||||
};
|
||||
} forEach _fires;
|
||||
};
|
||||
*/
|
||||
|
||||
if (isNil "_targets") exitWith {};
|
||||
//Search for objects
|
||||
if (count _targets == 0) then {
|
||||
_objects = nearestObjects [_agent,["ThrownObjects","GrenadeHandTimedWest","SmokeShell"],50];
|
||||
_objects = nearestObjects [_agent,["ThrownObjects","GrenadeHandTimedWest","SmokeShell"],_range/2];
|
||||
{
|
||||
private["_dis"];
|
||||
if (!(_x in _targets)) then {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_isAlive","_myDest","_newDest","_rnd","_lootType","_id"];
|
||||
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
|
||||
_position = _this select 0;
|
||||
_doLoiter = _this select 1;
|
||||
_unitTypes = _this select 2;
|
||||
_unitTypes = _this select 1;
|
||||
_doLoiter = true;
|
||||
|
||||
_isNoone = {isPlayer _x} count (_position nearEntities ["AllVehicles",30]) == 0;
|
||||
_loot = "";
|
||||
@@ -9,7 +9,7 @@ _array = [];
|
||||
_agent = objNull;
|
||||
|
||||
//Exit if a player is nearby
|
||||
if (!_isNoone) exitWith {};
|
||||
if (!isNoone) exitWith {};
|
||||
|
||||
if (count _unitTypes == 0) then {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
@@ -24,21 +24,26 @@ if (_doLoiter) then {
|
||||
_radius = 40;
|
||||
_method = "NONE";
|
||||
};
|
||||
|
||||
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
|
||||
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
|
||||
|
||||
if (_nearByPlayer) then {
|
||||
_position = [_position,25,80,10,0,0,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
_agent = createAgent [_type, _position, [], _radius, _method];
|
||||
|
||||
if (_doLoiter) then {
|
||||
_agent setPosATL _position;
|
||||
//_agent setPosATL _position;
|
||||
//_agent setVariable ["doLoiter",true,true];
|
||||
} else {
|
||||
_agent setVariable ["doLoiter",false,true];
|
||||
_agent setDir round(random 180);
|
||||
};
|
||||
dayz_spawnZombies = dayz_spawnZombies + 1;
|
||||
|
||||
//diag_log ("CREATE INFECTED: " + str(_this));
|
||||
|
||||
_position = getPosATL _agent;
|
||||
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
|
||||
//_position = getPosATL _agent;
|
||||
//_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
|
||||
|
||||
if (random 1 > 0.7) then {
|
||||
_agent setUnitPos "Middle";
|
||||
@@ -46,28 +51,24 @@ if (random 1 > 0.7) then {
|
||||
|
||||
//diag_log ("CREATED: " + str(_agent));
|
||||
|
||||
/*
|
||||
//_agent setVariable["host",player,true];
|
||||
if (!_doLoiter) then {
|
||||
_agent setPosATL _position;
|
||||
_agent setDir round(random 180);
|
||||
_agent setVariable ["doLoiter",false,true];
|
||||
if (_nearByPlayer) then {
|
||||
deleteVehicle _agent;
|
||||
};
|
||||
} else {
|
||||
if (_nearByPlayer) then {
|
||||
_attempt = 0;
|
||||
while {_nearByPlayer} do {
|
||||
//_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos; Orignal
|
||||
// _position = [_position,0,50,20,0,20,0] call BIS_fnc_findSafePos; OEM v2
|
||||
_position = [_position,30,60,20,0,20,0] call BIS_fnc_findSafePos;
|
||||
_agent setPos _position;
|
||||
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
|
||||
_position = [_position,40,80,10,0,20,0] call BIS_fnc_findSafePos;
|
||||
_agent switchmove AidlPpneMstpSnonWnonDnon_SleepA_layDown;
|
||||
_attempt = _attempt + 1;
|
||||
if (_attempt > 10) exitWith {};
|
||||
} else {
|
||||
_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos;
|
||||
_agent setPosATL _position;
|
||||
};
|
||||
_agent setPos _position;
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
if (isNull _agent) exitWith {
|
||||
dayz_spawnZombies = dayz_spawnZombies - 1;
|
||||
|
||||
@@ -33,7 +33,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzmod.com";
|
||||
version = "1.7.5.D1210";
|
||||
version = "1.7.5.D1216";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
@@ -191,9 +191,9 @@ class CfgBuildingLoot {
|
||||
2,
|
||||
0.06,
|
||||
0.04,
|
||||
0.01,
|
||||
0.03,
|
||||
0.04, //{"CZ_VestPouch_EP1","object"},
|
||||
0.03,
|
||||
0.02,
|
||||
0.01,
|
||||
0.01,
|
||||
0.03,
|
||||
@@ -243,7 +243,7 @@ class CfgBuildingLoot {
|
||||
0.04,
|
||||
0.05,
|
||||
0.02,
|
||||
0.03,
|
||||
0.02,
|
||||
0.04,
|
||||
0.01,
|
||||
0.04,
|
||||
@@ -329,9 +329,9 @@ class CfgBuildingLoot {
|
||||
0.05,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.02,
|
||||
0.04, //{"CZ_VestPouch_EP1","object"},
|
||||
0.03,
|
||||
0.02,
|
||||
0.01,
|
||||
0.01,
|
||||
0.3,
|
||||
@@ -373,6 +373,7 @@ class CfgBuildingLoot {
|
||||
//{"G36_C_SD_camo","weapon"},
|
||||
{"G36A_camo","weapon"},
|
||||
{"G36K_camo","weapon"},
|
||||
{"100Rnd_762x54_PK","magazine"},
|
||||
{ "Skin_Rocket_DZ","magazine" },
|
||||
{ "Skin_Soldier1_DZ","magazine" }
|
||||
};
|
||||
@@ -400,6 +401,7 @@ class CfgBuildingLoot {
|
||||
//0.01, //G36_C_SD_camo
|
||||
0.02, //G36A_camo
|
||||
0.02, //G36K_camo
|
||||
0.01, //("100Rnd_762x54_PK","magazine"}
|
||||
0.01,
|
||||
0.05
|
||||
};
|
||||
@@ -565,6 +567,7 @@ class CfgBuildingLoot {
|
||||
{"Sa58V_CCO_EP1","weapon"},
|
||||
{"G36_C_SD_camo","weapon"},
|
||||
{"M40A3","weapon"},
|
||||
{"100Rnd_762x54_PK","magazine"},
|
||||
{ "Skin_Soldier1_DZ","magazine" }
|
||||
};
|
||||
itemChance[] = {
|
||||
@@ -615,6 +618,7 @@ class CfgBuildingLoot {
|
||||
0.01, //Sa58V_CCO_EP1
|
||||
0.01, //{"G36_C_SD_camo","weapon"},
|
||||
0.02, // M40A3
|
||||
0.01, //("100Rnd_762x54_PK","magazine"}
|
||||
0.05
|
||||
};
|
||||
};
|
||||
@@ -909,6 +913,14 @@ class CfgBuildingLoot {
|
||||
lootPos[] = {};
|
||||
};
|
||||
|
||||
class UH60Wreck_DZ: Military {
|
||||
zombieClass[] = {"z_soldier_pilot","z_soldier_heavy"};
|
||||
zombieChance = 0;
|
||||
lootChance = 0;
|
||||
minRoaming = 4;
|
||||
maxRoaming = 8;
|
||||
lootPos[] = {};
|
||||
};
|
||||
|
||||
class USMC_WarfareBFieldhHospital: MASH {
|
||||
minRoaming = 1;
|
||||
|
||||
@@ -19,7 +19,8 @@ if (!isDedicated) then {
|
||||
player_temp_calculation = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_temperatur.sqf"; //Temperatur System //TeeChange
|
||||
player_weaponFiredNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponFiredNear.sqf";
|
||||
player_animalCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_animalCheck.sqf";
|
||||
player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnCheck.sqf";
|
||||
player_spawnLootCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnlootCheck.sqf";
|
||||
player_spawnZedCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnzedCheck.sqf";
|
||||
building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf";
|
||||
player_taskHint = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_taskHint.sqf";
|
||||
building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnZombies.sqf";
|
||||
@@ -48,6 +49,7 @@ if (!isDedicated) then {
|
||||
player_throwObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_throwObject.sqf";
|
||||
player_alertZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_alertZombies.sqf";
|
||||
player_fireMonitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
|
||||
player_combatCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_combatCheck.sqf";
|
||||
|
||||
//Objects
|
||||
object_roadFlare = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf";
|
||||
@@ -58,7 +60,6 @@ if (!isDedicated) then {
|
||||
zombie_loiter = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_loiter.sqf"; //Server compile, used for loiter behaviour
|
||||
zombie_generate = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf"; //Server compile, used for loiter behaviour
|
||||
|
||||
//Dogs
|
||||
dog_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dog_findTargetAgent.sqf";
|
||||
|
||||
// Vehicle damage fix
|
||||
@@ -225,7 +226,6 @@ if (!isDedicated) then {
|
||||
_btnRespawn ctrlEnable false;
|
||||
};
|
||||
|
||||
|
||||
dayz_disableAbort = {
|
||||
private["_display","_btnAbort","_combattimeout"];
|
||||
_combattimeout = player getVariable["combattimeout",0];
|
||||
@@ -239,7 +239,6 @@ if (!isDedicated) then {
|
||||
_btnAbort ctrlEnable false;
|
||||
};
|
||||
|
||||
|
||||
dayz_spaceInterrupt = {
|
||||
private ["_dikCode", "_handled"];
|
||||
_dikCode = _this select 1;
|
||||
|
||||
@@ -171,34 +171,24 @@ DAYZ_woundHit = [
|
||||
"hands",
|
||||
"legs",
|
||||
"head_hit"
|
||||
],[
|
||||
0.45,
|
||||
0.4,
|
||||
0.1,
|
||||
0.05
|
||||
]
|
||||
],
|
||||
[ 0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]
|
||||
];
|
||||
DAYZ_woundHit_ok = [
|
||||
[
|
||||
"body",
|
||||
"hands",
|
||||
"legs"
|
||||
],[
|
||||
0.5,
|
||||
0.3,
|
||||
0.2
|
||||
]
|
||||
],
|
||||
[0,0,0,0,0,1,1,1,2,2]
|
||||
];
|
||||
DAYZ_woundHit_dog = [
|
||||
[
|
||||
"body",
|
||||
"hands",
|
||||
"legs"
|
||||
],[
|
||||
0.1,
|
||||
0.45,
|
||||
0.35
|
||||
]
|
||||
],
|
||||
[0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2]
|
||||
];
|
||||
USEC_MinorWounds = [
|
||||
"hands",
|
||||
|
||||
@@ -39,11 +39,10 @@ if (_finished) then {
|
||||
player removeMagazine "ItemBloodbag";
|
||||
usecTransfuse = [_unit,player];
|
||||
publicVariable "usecTransfuse";
|
||||
dayzHumanity = [player,250];
|
||||
_id = dayzHumanity spawn player_humanityChange;
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
|
||||
dayzHumanity = [player,250];
|
||||
_id = dayzHumanity spawn player_humanityChange;
|
||||
};
|
||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ 1.7.5.D1210";
|
||||
text = "DayZ 1.7.5.D1216";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
class CA_TitleMainMenu;
|
||||
|
||||
@@ -114,8 +114,8 @@ link56[] = {49,50};
|
||||
link57[] = {50,49};
|
||||
link58[] = {51,52};
|
||||
link59[] = {52,29};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,81,6316128,1,-561.815979,576.218079,1245.283447,529.096497,955,601,1};
|
||||
window[] = {2,-1,-1,-32000,-32000,802,22,993,22,3,972};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,81,6316128,1,-561.815979,576.218079,1244.091797,527.904846,613,601,1};
|
||||
window[] = {2,-1,-1,-32000,-32000,890,110,1081,110,3,630};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
@@ -1068,7 +1068,7 @@ class FSM
|
||||
"dayz_slowCheck = [] spawn player_spawn_2;" \n
|
||||
"" \n
|
||||
"_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n
|
||||
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
|
||||
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],500];" \n
|
||||
"_town = ""Wilderness"";" \n
|
||||
"" \n
|
||||
"diag_log (""NearestCity"" + str(_nearestCity));" \n
|
||||
@@ -1082,19 +1082,30 @@ class FSM
|
||||
"" \n
|
||||
"dayz_animalCheck = [] spawn player_spawn_1;" \n
|
||||
"" \n
|
||||
"dayz_lootCheck = [_playerUID,_charID] spawn {" \n
|
||||
" private[""_handle"",""_humanity"",""_playerUID"",""_oldModel"",""_runOnce""];" \n
|
||||
" _playerUID = _this select 0;" \n
|
||||
" _charID = _this select 1;" \n
|
||||
" _runOnce = false;" \n
|
||||
"dayz_lootCheck = [] spawn {" \n
|
||||
" while {true} do {" \n
|
||||
" call player_spawnLootCheck;" \n
|
||||
" sleep 10;" \n
|
||||
" };" \n
|
||||
"};" \n
|
||||
"dayz_zedCheck = [] spawn {" \n
|
||||
" while {true} do {" \n
|
||||
" call player_spawnZedCheck; " \n
|
||||
" sleep 7;" \n
|
||||
" };" \n
|
||||
"};" \n
|
||||
"dayz_locationCheck = [] spawn {" \n
|
||||
" while {true} do {" \n
|
||||
"" \n
|
||||
" call player_spawnCheck; " \n
|
||||
"" \n
|
||||
" call stream_locationCheck;" \n
|
||||
" sleep 2;" \n
|
||||
" };" \n
|
||||
"};" \n
|
||||
"dayz_combatCheck = [] spawn {" \n
|
||||
" while {true} do {" \n
|
||||
" call player_combatCheck;" \n
|
||||
" sleep 5;" \n
|
||||
" };" \n
|
||||
"};" \n
|
||||
"// TODO: questionably" \n
|
||||
"{ _x call fnc_vehicleEventHandler; } forEach vehicles;" \n
|
||||
"" \n
|
||||
|
||||
@@ -1,141 +1,129 @@
|
||||
/*%FSM<COMPILE "D:\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Agent">*/
|
||||
/*%FSM<HEAD>*/
|
||||
/*
|
||||
item0[] = {"init",0,250,-75.000000,-250.000000,25.000000,-200.000000,0.000000,"init"};
|
||||
item0[] = {"init",0,250,-300.000000,-250.000000,-200.000000,-200.000000,0.000000,"init"};
|
||||
item1[] = {"End",1,250,175.000000,-250.000000,275.000000,-200.000000,0.000000,"End"};
|
||||
item2[] = {"wait",4,218,-75.000000,0.000000,25.000000,50.000000,0.000000,"wait"};
|
||||
item3[] = {"Looking_for_Targ",2,250,-75.000000,75.000000,25.000000,125.000000,0.000000,"Looking for" \n "Target"};
|
||||
item4[] = {"Not_Alive",4,218,0.000000,300.000000,100.000000,350.000000,5.000000,"Not" \n "Alive"};
|
||||
item5[] = {"Nobody_Near",4,218,0.000000,375.000000,100.000000,425.000000,4.000000,"Nobody" \n "Near"};
|
||||
item6[] = {"loiter",4,218,-325.000000,0.000000,-225.000000,50.000000,0.000000,"loiter"};
|
||||
item7[] = {"Loiter",2,250,-325.000000,75.000000,-225.000000,125.000000,0.000000,"Loiter"};
|
||||
item8[] = {"In_Position",4,218,-200.000000,75.000000,-100.000000,125.000000,1.000000,"In Position"};
|
||||
item9[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
|
||||
item10[] = {"",7,210,-29.000042,395.999939,-20.999958,404.000061,0.000000,""};
|
||||
item11[] = {"true",8,218,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"true"};
|
||||
item12[] = {"Begin",2,250,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"Begin"};
|
||||
item13[] = {"",7,210,-29.000006,-29.000004,-20.999996,-20.999996,0.000000,""};
|
||||
item14[] = {"",7,210,-279.000061,-29.000004,-270.999969,-20.999996,0.000000,""};
|
||||
item15[] = {"",7,210,-254.000046,146.000000,-245.999954,154.000000,0.000000,""};
|
||||
item16[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
|
||||
item17[] = {"Chase",2,4346,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
|
||||
item18[] = {"Time_Check",4,218,50.000000,75.000000,150.000000,125.000000,0.000000,"Time" \n "Check"};
|
||||
item19[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
|
||||
item20[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
|
||||
item21[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
|
||||
item22[] = {"Time_Check",4,218,-450.000000,75.000000,-350.000000,125.000000,0.000000,"Time" \n "Check"};
|
||||
item23[] = {"Time_Check",4,218,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time" \n "Check"};
|
||||
item24[] = {"No_Target",4,218,-275.000000,375.000000,-175.000000,425.000000,3.000000,"No" \n "Target"};
|
||||
item25[] = {"",7,210,-479.000000,396.000000,-471.000000,404.000000,0.000000,""};
|
||||
item26[] = {"",7,210,-479.000000,146.000000,-471.000000,154.000000,0.000000,""};
|
||||
item27[] = {"",7,210,221.000000,321.000000,229.000000,329.000000,0.000000,""};
|
||||
item28[] = {"",7,210,221.000000,396.000000,229.000000,404.000000,0.000000,""};
|
||||
item29[] = {"Cleanup_",2,250,175.000000,200.000000,275.000000,250.000000,0.000000,"Cleanup?"};
|
||||
item30[] = {"nobody_around",4,218,175.000000,-25.000000,275.000000,25.000000,0.000000,"nobody" \n "around"};
|
||||
item31[] = {"",7,210,-104.000023,396.000000,-95.999992,404.000000,0.000000,""};
|
||||
item32[] = {"cant_see",4,218,-275.000000,450.000000,-175.000000,500.000000,2.000000,"cant" \n "see"};
|
||||
item33[] = {"Finish_Move",2,250,-275.000000,525.000000,-175.000000,575.000000,0.000000,"Finish" \n "Move"};
|
||||
item34[] = {"finished",4,218,-425.000000,525.000000,-325.000000,575.000000,1.000000,"finished"};
|
||||
item35[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
|
||||
item36[] = {"",7,210,-29.000002,546.000000,-20.999998,554.000000,0.000000,""};
|
||||
item37[] = {"",7,210,-304.000000,146.000000,-296.000000,154.000000,0.000000,""};
|
||||
item38[] = {"someone_here",4,218,300.000000,200.000000,400.000000,250.000000,0.000000,"someone" \n "here"};
|
||||
item39[] = {"wait",2,250,300.000000,125.000000,400.000000,175.000000,0.000000,"wait"};
|
||||
item40[] = {"time_up",4,218,300.000000,-25.000000,400.000000,25.000000,0.000000,"time" \n "up"};
|
||||
item41[] = {"",7,210,346.000000,95.999992,354.000000,104.000000,0.000000,""};
|
||||
item42[] = {"",7,210,221.000000,96.000008,229.000000,103.999977,0.000000,""};
|
||||
item43[] = {"Time_Check",4,218,425.000000,125.000000,525.000000,175.000000,0.000000,"Time" \n "Check"};
|
||||
item44[] = {"",7,210,346.000000,-79.000000,354.000000,-71.000000,0.000000,""};
|
||||
item45[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
|
||||
item46[] = {"too_long",4,218,-425.000000,600.000000,-325.000000,650.000000,0.000000,"too long"};
|
||||
item47[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
|
||||
item48[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
|
||||
item49[] = {"Reset_Targeting",2,250,-525.000000,325.000000,-425.000000,375.000000,0.000000,"Reset" \n "Targeting"};
|
||||
item50[] = {"true",8,218,-525.000000,250.000000,-425.000000,300.000000,0.000000,"true"};
|
||||
item51[] = {"deleted",4,218,425.000000,-25.000000,525.000000,25.000000,0.000000,"deleted"};
|
||||
item52[] = {"",7,210,471.000000,-79.000000,479.000000,-71.000000,0.000000,""};
|
||||
item53[] = {"",7,210,471.000000,95.999977,479.000000,104.000023,0.000000,""};
|
||||
item54[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
|
||||
item55[] = {"player_check",4,218,-450.000000,0.000000,-350.000000,50.000000,0.000000,"player" \n "check"};
|
||||
item56[] = {"player_check",4,218,50.000000,0.000000,150.000000,50.000000,0.000000,"player" \n "check"};
|
||||
item57[] = {"is_Dedicated",4,218,50.000000,-250.000000,150.000000,-200.000000,5.000000,"is" \n "Dedicated"};
|
||||
link0[] = {0,11};
|
||||
link1[] = {0,57};
|
||||
link2[] = {2,3};
|
||||
link3[] = {3,18};
|
||||
link4[] = {3,19};
|
||||
link5[] = {3,56};
|
||||
link6[] = {4,27};
|
||||
link7[] = {5,28};
|
||||
link8[] = {6,7};
|
||||
link9[] = {7,8};
|
||||
link10[] = {7,15};
|
||||
link11[] = {7,22};
|
||||
link12[] = {7,55};
|
||||
link13[] = {8,7};
|
||||
link14[] = {9,4};
|
||||
link15[] = {9,10};
|
||||
link16[] = {10,5};
|
||||
link17[] = {11,12};
|
||||
link18[] = {12,13};
|
||||
link19[] = {13,2};
|
||||
link20[] = {13,14};
|
||||
link21[] = {14,6};
|
||||
link22[] = {15,19};
|
||||
link23[] = {16,17};
|
||||
link24[] = {17,9};
|
||||
link25[] = {17,23};
|
||||
link26[] = {17,31};
|
||||
link27[] = {18,3};
|
||||
link28[] = {19,20};
|
||||
link29[] = {20,9};
|
||||
link30[] = {20,21};
|
||||
link31[] = {21,16};
|
||||
link32[] = {22,7};
|
||||
link33[] = {23,17};
|
||||
link34[] = {24,25};
|
||||
link35[] = {25,49};
|
||||
link36[] = {26,37};
|
||||
link37[] = {27,29};
|
||||
link38[] = {28,27};
|
||||
link39[] = {29,38};
|
||||
link40[] = {29,42};
|
||||
link41[] = {30,45};
|
||||
link42[] = {31,24};
|
||||
link43[] = {31,54};
|
||||
link44[] = {32,33};
|
||||
link45[] = {33,34};
|
||||
link46[] = {33,36};
|
||||
link47[] = {33,47};
|
||||
link48[] = {34,35};
|
||||
link49[] = {35,25};
|
||||
link50[] = {36,10};
|
||||
link51[] = {37,7};
|
||||
link52[] = {38,39};
|
||||
link53[] = {39,41};
|
||||
link54[] = {39,43};
|
||||
link55[] = {40,44};
|
||||
link56[] = {41,40};
|
||||
link57[] = {41,42};
|
||||
link58[] = {41,53};
|
||||
link59[] = {42,30};
|
||||
link60[] = {43,39};
|
||||
link61[] = {44,45};
|
||||
link62[] = {45,1};
|
||||
link63[] = {46,48};
|
||||
link64[] = {47,46};
|
||||
link65[] = {48,35};
|
||||
link66[] = {49,50};
|
||||
link67[] = {50,26};
|
||||
link68[] = {51,52};
|
||||
link69[] = {52,44};
|
||||
link70[] = {53,51};
|
||||
link71[] = {54,32};
|
||||
link72[] = {55,7};
|
||||
link73[] = {56,3};
|
||||
link74[] = {57,1};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,97,6316128,1,-662.298340,610.054138,759.015137,-18.102575,984,601,1};
|
||||
window[] = {2,-1,-1,-1,-1,846,66,1274,66,3,1001};
|
||||
item2[] = {"Not_Alive",4,218,0.000000,300.000000,100.000000,350.000000,5.000000,"Not" \n "Alive"};
|
||||
item3[] = {"Nobody_Near",4,218,0.000000,375.000000,100.000000,425.000000,4.000000,"Nobody" \n "Near"};
|
||||
item4[] = {"loiter",4,218,-300.000000,0.000000,-200.000000,50.000000,0.000000,"loiter"};
|
||||
item5[] = {"Loiter",2,250,-300.000000,75.000000,-200.000000,125.000000,0.000000,"Loiter"};
|
||||
item6[] = {"In_Position",4,218,-175.000000,75.000000,-75.000000,125.000000,1.000000,"In Position"};
|
||||
item7[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
|
||||
item8[] = {"",7,210,-29.000042,395.999939,-20.999958,404.000061,0.000000,""};
|
||||
item9[] = {"true",8,218,-300.000000,-175.000000,-200.000000,-125.000000,0.000000,"true"};
|
||||
item10[] = {"Begin",2,250,-300.000000,-100.000000,-200.000000,-50.000000,0.000000,"Begin"};
|
||||
item11[] = {"",7,210,-254.000046,-29.000004,-245.999954,-20.999996,0.000000,""};
|
||||
item12[] = {"",7,210,-204.000046,146.000000,-195.999954,154.000000,0.000000,""};
|
||||
item13[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
|
||||
item14[] = {"Chase",2,250,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
|
||||
item15[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
|
||||
item16[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
|
||||
item17[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
|
||||
item18[] = {"Time_Check",4,218,-425.000000,75.000000,-325.000000,125.000000,0.000000,"Time" \n "Check"};
|
||||
item19[] = {"Time_Check",4,218,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time" \n "Check"};
|
||||
item20[] = {"No_Target",4,218,-275.000000,375.000000,-175.000000,425.000000,3.000000,"No" \n "Target"};
|
||||
item21[] = {"",7,210,-479.000000,396.000000,-471.000000,404.000000,0.000000,""};
|
||||
item22[] = {"",7,210,-479.000000,146.000000,-471.000000,154.000000,0.000000,""};
|
||||
item23[] = {"",7,210,221.000000,321.000000,229.000000,329.000000,0.000000,""};
|
||||
item24[] = {"",7,210,221.000000,396.000000,229.000000,404.000000,0.000000,""};
|
||||
item25[] = {"Cleanup_",2,250,175.000000,200.000000,275.000000,250.000000,0.000000,"Cleanup?"};
|
||||
item26[] = {"nobody_around",4,218,175.000000,-25.000000,275.000000,25.000000,0.000000,"nobody" \n "around"};
|
||||
item27[] = {"",7,210,-104.000023,396.000000,-95.999992,404.000000,0.000000,""};
|
||||
item28[] = {"cant_see",4,218,-275.000000,450.000000,-175.000000,500.000000,2.000000,"cant" \n "see"};
|
||||
item29[] = {"Finish_Move",2,250,-275.000000,525.000000,-175.000000,575.000000,0.000000,"Finish" \n "Move"};
|
||||
item30[] = {"finished",4,218,-425.000000,525.000000,-325.000000,575.000000,1.000000,"finished"};
|
||||
item31[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
|
||||
item32[] = {"",7,210,-29.000002,546.000000,-20.999998,554.000000,0.000000,""};
|
||||
item33[] = {"",7,210,-304.000000,146.000000,-296.000000,154.000000,0.000000,""};
|
||||
item34[] = {"someone_here",4,218,300.000000,200.000000,400.000000,250.000000,0.000000,"someone" \n "here"};
|
||||
item35[] = {"wait",2,250,300.000000,125.000000,400.000000,175.000000,0.000000,"wait"};
|
||||
item36[] = {"time_up",4,218,300.000000,-25.000000,400.000000,25.000000,0.000000,"time" \n "up"};
|
||||
item37[] = {"",7,210,346.000000,95.999992,354.000000,104.000000,0.000000,""};
|
||||
item38[] = {"",7,210,221.000000,96.000008,229.000000,103.999977,0.000000,""};
|
||||
item39[] = {"Time_Check",4,218,425.000000,125.000000,525.000000,175.000000,0.000000,"Time" \n "Check"};
|
||||
item40[] = {"",7,210,346.000000,-79.000000,354.000000,-71.000000,0.000000,""};
|
||||
item41[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
|
||||
item42[] = {"too_long",4,218,-425.000000,600.000000,-325.000000,650.000000,0.000000,"too long"};
|
||||
item43[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
|
||||
item44[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
|
||||
item45[] = {"Reset_Targeting",2,4346,-525.000000,325.000000,-425.000000,375.000000,0.000000,"Reset" \n "Targeting"};
|
||||
item46[] = {"true",8,218,-525.000000,250.000000,-425.000000,300.000000,0.000000,"true"};
|
||||
item47[] = {"deleted",4,218,425.000000,-25.000000,525.000000,25.000000,0.000000,"deleted"};
|
||||
item48[] = {"",7,210,471.000000,-79.000000,479.000000,-71.000000,0.000000,""};
|
||||
item49[] = {"",7,210,471.000000,95.999977,479.000000,104.000023,0.000000,""};
|
||||
item50[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
|
||||
item51[] = {"player_check",4,218,-425.000000,0.000000,-325.000000,50.000000,0.000000,"player" \n "check"};
|
||||
item52[] = {"is_Dedicated",4,218,50.000000,-250.000000,150.000000,-200.000000,5.000000,"is" \n "Dedicated"};
|
||||
link0[] = {0,9};
|
||||
link1[] = {0,52};
|
||||
link2[] = {2,23};
|
||||
link3[] = {3,24};
|
||||
link4[] = {4,5};
|
||||
link5[] = {5,6};
|
||||
link6[] = {5,12};
|
||||
link7[] = {5,18};
|
||||
link8[] = {5,51};
|
||||
link9[] = {6,5};
|
||||
link10[] = {7,2};
|
||||
link11[] = {7,8};
|
||||
link12[] = {8,3};
|
||||
link13[] = {9,10};
|
||||
link14[] = {10,11};
|
||||
link15[] = {11,4};
|
||||
link16[] = {12,15};
|
||||
link17[] = {12,17};
|
||||
link18[] = {13,14};
|
||||
link19[] = {14,7};
|
||||
link20[] = {14,19};
|
||||
link21[] = {14,27};
|
||||
link22[] = {15,16};
|
||||
link23[] = {16,7};
|
||||
link24[] = {17,13};
|
||||
link25[] = {18,5};
|
||||
link26[] = {19,14};
|
||||
link27[] = {20,21};
|
||||
link28[] = {21,45};
|
||||
link29[] = {22,33};
|
||||
link30[] = {23,25};
|
||||
link31[] = {24,23};
|
||||
link32[] = {25,34};
|
||||
link33[] = {25,38};
|
||||
link34[] = {26,41};
|
||||
link35[] = {27,20};
|
||||
link36[] = {27,50};
|
||||
link37[] = {28,29};
|
||||
link38[] = {29,30};
|
||||
link39[] = {29,32};
|
||||
link40[] = {29,43};
|
||||
link41[] = {30,31};
|
||||
link42[] = {31,21};
|
||||
link43[] = {32,8};
|
||||
link44[] = {33,5};
|
||||
link45[] = {34,35};
|
||||
link46[] = {35,37};
|
||||
link47[] = {35,39};
|
||||
link48[] = {36,40};
|
||||
link49[] = {37,36};
|
||||
link50[] = {37,38};
|
||||
link51[] = {37,49};
|
||||
link52[] = {38,26};
|
||||
link53[] = {39,35};
|
||||
link54[] = {40,41};
|
||||
link55[] = {41,1};
|
||||
link56[] = {42,44};
|
||||
link57[] = {43,42};
|
||||
link58[] = {44,31};
|
||||
link59[] = {45,17};
|
||||
link60[] = {45,46};
|
||||
link61[] = {46,22};
|
||||
link62[] = {47,48};
|
||||
link63[] = {48,40};
|
||||
link64[] = {49,47};
|
||||
link65[] = {50,28};
|
||||
link66[] = {51,5};
|
||||
link67[] = {52,1};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,99,6316128,1,-558.318542,127.785744,629.057495,-6.630199,626,580,1};
|
||||
window[] = {0,-1,-1,-32000,-32000,712,46,1254,1,1,643};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
@@ -197,92 +185,6 @@ class FSM
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Looking_for_Targ">*/
|
||||
class Looking_for_Targ
|
||||
{
|
||||
name = "Looking_for_Targ";
|
||||
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
|
||||
"_target = _agent call zombie_findTargetAgent;" \n
|
||||
"_timeN = time;" \n
|
||||
"" \n
|
||||
"_newDest = _agent getVariable [""myDest"",getposATL _agent];" \n
|
||||
"if (!isNil ""_newDest"") then {" \n
|
||||
" if (_newDest distance _myDest > 0) then {" \n
|
||||
" _myDest = _newDest;" \n
|
||||
" _agent moveTo _myDest;" \n
|
||||
" _agent forceSpeed 2;" \n
|
||||
" };" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"diag_log (""Zombie "" + str(_agent) + "" Wait "");"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "Not_Alive">*/
|
||||
class Not_Alive
|
||||
{
|
||||
priority = 5.000000;
|
||||
to="Cleanup_";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!_isAlive"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Nobody_Near">*/
|
||||
class Nobody_Near
|
||||
{
|
||||
priority = 4.000000;
|
||||
to="Cleanup_";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Has_Target">*/
|
||||
class Has_Target
|
||||
{
|
||||
priority = 1.000000;
|
||||
to="Chase";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
|
||||
"if (_isSomeone) then {" \n
|
||||
" [_agent,""spotted"",0,false] call dayz_zombieSpeak;" \n
|
||||
"};" \n
|
||||
"if (!_hasMoved) then {" \n
|
||||
" _agent setVariable[""doLoiter"",true,true];" \n
|
||||
"};" \n
|
||||
"_countr = 0;" \n
|
||||
"_losCheck = 0;" \n
|
||||
"_cantSee = false;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "player_check">*/
|
||||
class player_check
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Looking_for_Targ";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"(time - _entityTime) > 30"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_entityTime = time;" \n
|
||||
"" \n
|
||||
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
|
||||
"_isSomeone = ({isPlayer _x} count _list) > 0;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Time_Check">*/
|
||||
class Time_Check
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Looking_for_Targ";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 1"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Loiter">*/
|
||||
class Loiter
|
||||
{
|
||||
@@ -342,11 +244,12 @@ class FSM
|
||||
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
|
||||
"if (_isSomeone) then {" \n
|
||||
" [_agent,""spotted"",0,false] call dayz_zombieSpeak;" \n
|
||||
" [_agent,""spotted"",2,true] call dayz_zombieSpeak;" \n
|
||||
"};" \n
|
||||
"if (!_hasMoved) then {" \n
|
||||
" _agent setVariable[""doLoiter"",true,true];" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"_countr = 0;" \n
|
||||
"_losCheck = 0;" \n
|
||||
"_cantSee = false;"/*%FSM</ACTION""">*/;
|
||||
@@ -358,7 +261,7 @@ class FSM
|
||||
priority = 1.000000;
|
||||
to="Loiter";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_agent distance (_agent getVariable [""myDest"",getposATL _agent]) < 3"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_agent distance (_agent getVariable [""myDest"",getposATL _agent]) < 10"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"[_agent,_position] call zombie_loiter;" \n
|
||||
"_myDest = _agent getVariable [""myDest"",getposATL _agent];" \n
|
||||
""/*%FSM</ACTION""">*/;
|
||||
@@ -441,16 +344,6 @@ class FSM
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "wait">*/
|
||||
class wait
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Looking_for_Targ";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!_hasMoved"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
@@ -467,7 +360,7 @@ class FSM
|
||||
"" \n
|
||||
"//Move to target" \n
|
||||
"_agent moveTo _targetPos;" \n
|
||||
"_agent forceSpeed 6;" \n
|
||||
"_agent forceSpeed 7;" \n
|
||||
"" \n
|
||||
"//Check if LOS" \n
|
||||
"if (_losCheck == 2) then {" \n
|
||||
@@ -537,7 +430,7 @@ class FSM
|
||||
name = "Cleanup_";
|
||||
init = /*%FSM<STATEINIT""">*/"_waitStart = time;" \n
|
||||
"" \n
|
||||
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
|
||||
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],400];" \n
|
||||
"_isSomeone = ({isPlayer _x} count _list) > 0;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@@ -679,6 +572,26 @@ class FSM
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "Has_Target">*/
|
||||
class Has_Target
|
||||
{
|
||||
priority = 1.000000;
|
||||
to="Chase";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
|
||||
"if (_isSomeone) then {" \n
|
||||
" [_agent,""spotted"",2,true] call dayz_zombieSpeak;" \n
|
||||
"};" \n
|
||||
"if (!_hasMoved) then {" \n
|
||||
" _agent setVariable[""doLoiter"",true,true];" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"_countr = 0;" \n
|
||||
"_losCheck = 0;" \n
|
||||
"_cantSee = false;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
|
||||
@@ -75,34 +75,23 @@ while {true} do {
|
||||
};
|
||||
|
||||
_num = round(random _randomizedLoot) + _guaranteedLoot;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _lootTable;
|
||||
_itemType = [] + getArray (_config >> "itemType");
|
||||
_itemChance = [] + getArray (_config >> "itemChance");
|
||||
|
||||
_config = configFile >> "CfgBuildingLoot" >> "HeliCrash";
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_index = dayz_CBLCounts find (count _itemTypes);
|
||||
_weights = dayz_CBLChances select _index;
|
||||
_cntWeights = count _weights;
|
||||
|
||||
waituntil {!isnil "fnc_buildWeightedArray"};
|
||||
|
||||
for "_x" from 1 to _num do {
|
||||
private["_totalItems","_randomNum"];
|
||||
//create loot
|
||||
_index = floor(random _cntWeights);
|
||||
_index = _weights select _index;
|
||||
_itemType = _itemTypes select _index;
|
||||
[_itemType select 0, _itemType select 1, _position, 5] call spawn_loot;
|
||||
|
||||
// _weights is rebuilt every itteration of this loop since there's some weird bug that causes _weights
|
||||
// to lose data each itteration of the 'for' loop despite no manipulation of it. That's why the original wreck
|
||||
// code had the condition "if (count _itemType > _index) then {" since sometimes _index would be larger than
|
||||
// the data left in the array. So, yes, this is not performant -- but this code is called so infrequently
|
||||
// that this seems to be more tolerable than the prior way which meant some loot simply wouldn't spawn in for the wreck.
|
||||
_weights = [];
|
||||
_weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
|
||||
_totalItems = (count _weights) - 1;
|
||||
_randomNum = round(random _totalItems);
|
||||
_index = _weights select _randomNum;
|
||||
//diag_log(format["DIAG: Total Items: %1 | Random Num: %2 | Index: %3 | Selection: %4 | Weights: %5", _totalItems, _randomNum, _index, str(_itemType select _index), count _weights]);
|
||||
|
||||
_iArray = (_itemType select _index);
|
||||
_iArray set [2,_position];
|
||||
_iArray set [3,5]; // Spawn radius: May need to expose this as configurable or use sizeOf(_crashModel) here. Some wreck models have GIANT sizeOf though and may scatter loot too far
|
||||
//diag_log(format["DIAG: _iArray => %1 <=", str(_iArray)]);
|
||||
_iArray call spawn_loot;
|
||||
|
||||
diag_log(format["CRASHSPAWNER: Loot spawn at '%1' with loot table '%2': %3 (%4)", _crashName, _lootTable, _iArray select 0, _iArray select 1]);
|
||||
diag_log(format["CRASHSPAWNER: Loot spawn at '%1' with loot table '%2'", _crashName, _lootTable]);
|
||||
|
||||
// ReammoBox is preferred parent class here, as WeaponHolder wouldn't match MedBox0 and other such items.
|
||||
_nearby = _position nearObjects ["ReammoBox", sizeOf(_crashModel)];
|
||||
|
||||
@@ -25,6 +25,7 @@ local_createObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\comp
|
||||
server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
|
||||
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
|
||||
server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
|
||||
server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
|
||||
|
||||
vehicle_handleInteract = {
|
||||
private["_object"];
|
||||
|
||||
@@ -242,5 +242,7 @@ for "_x" from 1 to MaxDynamicDebris do {
|
||||
|
||||
allowConnection = true;
|
||||
|
||||
_randomcrashmodel = ["UH60Wreck_DZ","UH1Wreck_DZ","UH60Wreck_DZ","UH1Wreck_DZ"] call BIS_fnc_selectRandom;
|
||||
_randomcrashloot = ["Military","HeliCrash","MilitarySpecial","Military","HeliCrash","MilitarySpecial"] call BIS_fnc_selectRandom;
|
||||
// [_crashModel, _lootTable, _guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
|
||||
nul = ['UH1Wreck_DZ', 'HeliCrash', 3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] call server_spawnCrashSite;
|
||||
nul = [_randomcrashmodel, _randomcrashloot, 3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
|
||||
Reference in New Issue
Block a user