private arrays part 2

This commit is contained in:
[VB]AWOL
2013-10-22 10:16:20 -05:00
parent af4b876cde
commit 207f4e3b88
58 changed files with 91 additions and 62 deletions

View File

@@ -368,7 +368,7 @@ class CfgLootSmall {
0.04,
0.01,
0.04,
0.01,
0.01
}
};
policeman[] = {
@@ -450,7 +450,7 @@ class CfgLootSmall {
"Skin_Rocker4_DZ",
"Skin_SurvivorW3_DZ",
"Skin_SurvivorWpink_DZ",
"Skin_SurvivorWurban_DZ",
"Skin_SurvivorWurban_DZ"
//"Skin_SurvivorWsequisha_DZ",
//"Skin_SurvivorWsequishaD_DZ",
},
@@ -465,7 +465,7 @@ class CfgLootSmall {
0.08,
0.09,
0.09,
0.07,
0.07
//0.04,
//0.02
}
@@ -518,7 +518,7 @@ class CfgLootSmall {
"Skin_GUE_Soldier_Sniper_DZ",
"Skin_GUE_Soldier_Crew_DZ",
"Skin_GUE_Soldier_CO_DZ",
"Skin_GUE_Soldier_2_DZ",
"Skin_GUE_Soldier_2_DZ"
},
{
0.1,

View File

@@ -748,7 +748,7 @@ class Turrets : Turrets
"PKT"
};
magazines[] = {
"100Rnd_762x54_PK",
"100Rnd_762x54_PK"
};
soundServo[] = {
};

View File

@@ -495,7 +495,7 @@ class CfgLoot {
"Skin_Rocker4_DZ",
"Skin_SurvivorW3_DZ",
"Skin_SurvivorWpink_DZ",
"Skin_SurvivorWurban_DZ",
"Skin_SurvivorWurban_DZ"
//"Skin_SurvivorWsequisha_DZ",
//"Skin_SurvivorWsequishaD_DZ",
},
@@ -510,7 +510,7 @@ class CfgLoot {
0.08,
0.09,
0.09,
0.07,
0.07
//0.04,
//0.02
}
@@ -563,7 +563,7 @@ class CfgLoot {
"Skin_GUE_Soldier_Sniper_DZ",
"Skin_GUE_Soldier_Crew_DZ",
"Skin_GUE_Soldier_CO_DZ",
"Skin_GUE_Soldier_2_DZ",
"Skin_GUE_Soldier_2_DZ"
},
{
0.1,
@@ -587,12 +587,12 @@ class CfgLoot {
{
"ItemTentOld",
"ItemTentDomed",
"ItemTentDomed2",
"ItemTentDomed2"
},
{
0.34,
0.33,
0.33,
0.33
}
};
backpacks[] = {
@@ -602,7 +602,7 @@ class CfgLoot {
"DZ_TerminalPack_EP1", // 1-15
"DZ_ALICE_Pack_EP1", // 2-20
"DZ_TK_Assault_Pack_EP1", // 2-22
"DZ_CompactPack_EP1", // 2-25
"DZ_CompactPack_EP1" // 2-25
},
{
0.22,
@@ -610,7 +610,7 @@ class CfgLoot {
0.18,
0.16,
0.13,
0.11,
0.11
}
};
militarybackpacks[] = {
@@ -626,7 +626,7 @@ class CfgLoot {
0.25,
0.20,
0.15,
0.10,
0.10
}
};
};

View File

@@ -14,7 +14,7 @@ Returns a vector that is the sum of <vector1> and <vector2>.
************************************************************/
private["_p1","_p2","_return"];
private ["_p1","_p2","_return","_c"];
_p1 = _this select 0;
_p2 = _this select 1;

View File

@@ -3,7 +3,7 @@ ASSIGN DAMAGE TO A UNIT
- Function Vehicle_HandleDamage
- [unit, selectionName, damage, source, projectile] call Vehicle_HandleDamage;
************************************************************/
private["_unit","_selection","_strH","_dam","_total","_damage","_needUpdate"];
private ["_unit","_selection","_strH","_dam","_total","_needUpdate"];
_unit = _this select 0;
_selection = _this select 1;
_total = _this select 2;

View File

@@ -1,4 +1,4 @@
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
private ["_position","_doLoiter","_unitTypes","_loot","_array","_agent","_type","_radius","_method","_myDest","_newDest","_lootType","_player","_isAlive","_rnd","_id"];
_player = _this select 0;
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
_doLoiter = true;

View File

@@ -1,4 +1,4 @@
private["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_leadheight","_nearEnts","_rnd","_assigned"];
private ["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_rnd","_assigned","_fires","_range"];
_group = _this;
_target = objNull;
_lead = leader _group;

View File

@@ -1,4 +1,4 @@
private["_agent","_target","_targets","_targetDis","_c","_man","_manDis","_targets","_agent","_agentheight","_nearEnts","_rnd","_assigned","_range","_objects"];
private ["_agent","_target","_targets","_targetDis","_man","_manDis","_range","_objects","_refobj"];
_agent = _this;
_target = objNull;
/*

View File

@@ -1,4 +1,4 @@
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
private ["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_myDest","_newDest","_lootType","_isAlive","_rnd","_id"];
_position = _this select 0;
_doLoiter = _this select 1;
_unitTypes = _this select 2;

View File

@@ -1,4 +1,4 @@
private["_unit"];
private ["_unit","_position"];
_unit = _this select 0;
if (isServer) then {
_unit addEventHandler ["local", {_this call zombie_findOwner}];

View File

@@ -1,4 +1,4 @@
private["_unit","_originalPos","_pos"];
private ["_unit","_originalPos","_pos","_chance","_playerpos"];
_unit = _this select 0;
_originalPos = _this select 1;
_pos = getPosATL _unit;

View File

@@ -3,9 +3,6 @@
*/
//Player only
if (!isDedicated) then {
_config = configFile >> "CfgLoot";
_config1 = configFile >> "CfgMagazines" >> "FoodEdible";
_config2 = configFile >> "CfgWeapons" >> "Loot";
"filmic" setToneMappingParams [0.07, 0.31, 0.23, 0.37, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";

View File

@@ -1,4 +1,4 @@
private["_cfgCount","_config","_i","_itemChances","_itemCount","_weighted","_j","_weight","_l","_k","_type","_canZombie","_canLoot"];
private ["_config","_itemChances","_itemCount","_weighted","_j","_weight","_type","_canZombie","_canLoot","_classname","_itemChancesSmall","_itemCountSmall"];
dayz_CBLChances = [];
dayz_CBLBase = [];

View File

@@ -3,7 +3,7 @@ ASSIGN DAMAGE HANDLER TO A UNIT
- Function set_EH
- unit call set_EH;
************************************************************/
private["_unit","_eh1","_eh2","_dir","_location"];
private ["_unit","_eh1","_eh2","_dir","_location","_eh3","_eh4","_eh5","_eh6"];
_unit = _this;
_dir = getdir _this;
_location = getPosATL _this;

View File

@@ -1,4 +1,4 @@
private["_unit"];
private ["_unit","_id"];
_unit = _this select 0;
_id = _unit addeventhandler ["HandleDamage",{_this call local_zombieDamage}];
_id = _unit addeventhandler ["Killed",{[_this,"zombieKills"] call local_eventKill}];

View File

@@ -1,4 +1,4 @@
private["_hasMeds","_med","_effect"];
private ["_hasMeds","_med"];
_med = "ItemAntibiotic";
_hasMeds = _med in magazines player;
if (_hasMeds) then {

View File

@@ -1,4 +1,7 @@
// bleed.sqf
private ["_started","_finished","_animState","_isMedic","_id","_unit"];
_unit = (_this select 3) select 0;
player removeMagazine "ItemBandage";

View File

@@ -9,7 +9,7 @@
Start carry.sqf
*/
private ["_unit","_dragee","_pos","_dir"];
private ["_unit","_dragee","_anim_name","_can_be_revived","_can_be_revived_2"];
_dragee = _this select 3;
_can_be_revived = NORRN_revive_array select 20;
_can_be_revived_2 = NORRN_revive_array select 21;

View File

@@ -9,7 +9,7 @@
Start carry.sqf
*/
private ["_unit","_dragee","_pos","_dir"];
private ["_unit","_dragee","_anim_name","_can_be_revived","_can_be_revived_2"];
_dragee = _this select 3;
_can_be_revived = NORRN_revive_array select 20;
_can_be_revived_2 = NORRN_revive_array select 21;

View File

@@ -9,7 +9,7 @@
Start drag.sqf
*/
private ["_unit","_dragee","_pos","_dir"];
private ["_unit","_dragee","_unconscious"];
_dragee = _this select 3;
_unit = player;
_unconscious = _dragee getVariable ["NORRN_unconscious", false];

View File

@@ -8,6 +8,7 @@
Start drop_body.sqf
*/
private ["_dragee","_unit"];
_dragee = _this select 3;
player removeAction NORRN_dropAction;

View File

@@ -1,4 +1,6 @@
// bleed.sqf
private ["_unit","_isDead"];
_unit = (_this select 3) select 0;
_isDead = _unit getVariable["USEC_isDead",false];
call fnc_usec_medic_removeActions;

View File

@@ -1,5 +1,5 @@
// init_related_scripts.sqf ArmA2 revive
// <20> AUGUST 2010 - norrin
// <20> AUGUST 2010 - norrin
// Functions
@@ -9,6 +9,8 @@
#include "\ca\editor\Data\Scripts\dikCodes.h"
//Settings
private ["_id","_rnd","_lowBlood"];
usec_bandage_recovery = 5; //time to recover after bandaging
//"colorCorrections" ppEffectEnable true;

View File

@@ -1,7 +1,7 @@
// Load_wounded.sqf
// OCTOBER 2010 - norrin
private ["_wounded","_vcl","_group"];
private ["_wounded","_vcl"];
_wounded = _this select 0;

View File

@@ -1,7 +1,7 @@
// unLoad_act.sqf
// AUGUST 2010 - norrin
private ["_args","_dragger","_vcl","_wounded"];
private ["_args","_vcl","_loop","_position","_isOnDeck","_unit","_name","_crewVcl"];
_args = _this select 3;
_name = _args select 0;

View File

@@ -1,7 +1,7 @@
// Load_wounded.sqf
// OCTOBER 2010 - norrin
private ["_wounded","_vcl","_group"];
private ["_wounded","_vcl"];
_wounded = _this select 0;

View File

@@ -1,4 +1,6 @@
// bleed.sqf
private ["_started","_finished","_animState","_isMedic","_id","_num_removed","_unit"];
_unit = (_this select 3) select 0;
_unit setVariable ["hit_legs",0];

View File

@@ -1,6 +1,6 @@
// bleed.sqf
private ["_id","_unit"];
private ["_id","_unit","_num_removed"];
_unit = (_this select 3) select 0;

View File

@@ -1,5 +1,6 @@
// allowDamage.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";

View File

@@ -1,5 +1,6 @@
// animDrag.sqf
private ["_dragee"];
_dragee = _this select 0;
_dragee switchmove "ainjppnemstpsnonwrfldb_still";

View File

@@ -1,5 +1,6 @@
// animHealed.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";

View File

@@ -1,4 +1,5 @@
//carriedUp.sqf
private ["_dragee"];
_dragee = _this select 0;
_dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_up";

View File

@@ -1,6 +1,6 @@
//deadState.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "deadState";
_unit switchMove "deadState";

View File

@@ -1,6 +1,6 @@
//lieStill.sqf
private ["_dragee"];
_dragee = _this select 0;
_dragee playMoveNow "ainjppnemstpsnonwrfldnon";
_dragee playMoveNow "ainjppnemstpsnonwrfldnon";

View File

@@ -1,5 +1,6 @@
// load_wounded.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "kia_hmmwv_driver";

View File

@@ -1,5 +1,5 @@
// medBreakLegs.sqf
private["_array","_unit","_attacker","_display","_control","_hitLegs","_hitArms"];
private ["_array","_unit","_attacker","_cnt","_index","_hit","_damage","_wound","_isInjured","_lowBlood"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;

View File

@@ -1,4 +1,6 @@
// animHealed.sqf
private ["_array","_unit","_medic","_isDead"];
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;

View File

@@ -1,5 +1,5 @@
// animHealed.sqf
private["_array","_unit","_medic","_display","_control","_hitLegs","_hitArms"];
private ["_array","_unit","_medic","_display","_control","_id"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;

View File

@@ -1,4 +1,6 @@
// animHealed.sqf
private ["_array","_unit","_medic"];
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;

View File

@@ -1,5 +1,5 @@
// animHealed.sqf
private["_array","_unit","_medic","_display","_control","_lowBlood"];
private ["_array","_unit","_medic","_display","_control","_rndInfection","_TransfusionInfection"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;

View File

@@ -1,4 +1,6 @@
// animHealed.sqf
private ["_array","_unit","_medic","_item"];
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;

View File

@@ -1,5 +1,6 @@
//noAnim.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "";

View File

@@ -1,8 +1,9 @@
// noDamage.sqf
private ["_unit"];
_unit = _this select 0;
_unit setCaptive 3;
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
_unit allowDamage false;
sleep 0.01;
sleep 0.01;

View File

@@ -1,5 +1,6 @@
// pickUp.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";

View File

@@ -1,5 +1,6 @@
// promptRName.sqf
private ["_unit"];
_unit = _this select 0;
call compile format ["server globalChat reviver_%1", _unit];

View File

@@ -1,6 +1,6 @@
// rolltoback.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "ainjppnemstpsnonwrfldnon_rolltoback";
_unit switchMove "ainjppnemstpsnonwrfldnon_rolltoback";

View File

@@ -1,6 +1,6 @@
// rolltofront.sqf
private ["_unit"];
_unit = _this select 0;
_unit switchMove "ainjppnemstpsnonwrfldnon_rolltofront";
_unit switchMove "ainjppnemstpsnonwrfldnon_rolltofront";

View File

@@ -1,5 +1,6 @@
// set180.sqf
private ["_dragee"];
_dragee = _this select 0;
_dragee setDir 180;

View File

@@ -1,4 +1,6 @@
// bleed.sqf
private ["_unit","_isDead","_isCardiac"];
_unit = (_this select 3);
_isDead = _unit getVariable["USEC_isDead",false];
_isCardiac = _unit getVariable["USEC_isCardiac",false];

View File

@@ -4,7 +4,7 @@ fnc_usec_damageHandle = {
- Function
- [unit] call fnc_usec_damageHandle;
************************************************************/
private["_unit","_eh"];
private ["_unit"];
_unit = _this select 0;
// Remove handle damage override
@@ -16,6 +16,8 @@ fnc_usec_damageHandle = {
};
fnc_usec_pitchWhine = {
private ["_visual","_sound"];
_visual = _this select 0;
_sound = _this select 1;
//affect the player
@@ -33,14 +35,12 @@ fnc_usec_pitchWhine = {
};
fnc_usec_damageUnconscious = {
private["_unit","_damage"];
private ["_unit","_damage","_inVehicle"];
_unit = _this select 0;
_damage = _this select 1;
_inVehicle = (vehicle _unit != _unit);
if (_unit == player) then {
r_player_timeout = round(((random 2) * _damage) * 40);
if (_type == 1) then {r_player_timeout = r_player_timeout + 90};
if (_type == 2) then {r_player_timeout = r_player_timeout + 60};
r_player_timeout = round((((random 2) max 0.1) * _damage) * 20);
r_player_unconscious = true;
player setVariable["medForceUpdate",true,true];
player setVariable ["unconsciousTime", r_player_timeout, true];
@@ -104,6 +104,8 @@ fnc_usec_damageGetWound = {
};
fnc_usec_medic_removeActions = {
private ["_obj"];
_obj = player;
{
_obj = _x;
@@ -131,7 +133,7 @@ fnc_med_publicBlood = {
};
fnc_usec_playerBleed = {
private["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime"];
private ["_bleedTime","_bleedPerSec","_total","_bTime","_myBleedTime","_id"];
_bleedTime = 400; //seconds
_bleedPerSec = (r_player_bloodTotal / _bleedTime);
_total = r_player_bloodTotal;
@@ -170,7 +172,7 @@ fnc_usec_damageBleed = {
- Function
- [_unit, _wound, _injury] call fnc_usec_damageBleed;
************************************************************/
private["_unit","_wound","_injury","_modelPos","_point","_source"];
private ["_unit","_wound","_injury","_modelPos","_point","_source","_rndX"];
_unit = _this select 0;
_wound = _this select 1;
_injury = _this select 2;

View File

@@ -1,4 +1,4 @@
private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused","_text"];
private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused"];
// bleed.sqf
_unit = (_this select 3) select 0;
//_lowBlood = _unit getVariable ["USEC_lowBlood", false];

View File

@@ -1,4 +1,5 @@
private ["_fl","_sm","_expl","_dr","_tv","_i","_wave","_splash","_velz","_v","_int","_t","_pos"];
_v=_this select 0;
_int = (fuel _v)*(8+random 2);
_t=time;

View File

@@ -1,3 +1,5 @@
private ["_dr","_pos","_xv","_yv","_dir","_Crater","_speed","_velz","_tv","_zv","_shards","_i","_smoke","_fire","_dirt","_int","_t","_v"];
_int = _this select 1;
_t=_this select 2;
_pos=getpos _v;

View File

@@ -1,4 +1,4 @@
private ["_v","_int","_t"];
private ["_v","_int","_t","_b"];
_v=_this select 0;
if (_v iskindof "helicopter" || _v iskindof "plane")
then

View File

@@ -4,7 +4,7 @@
Refactored By Alby
*/
private["_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed"];
private ["_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed","_debug"];
waitUntil {vehicle player == player};

View File

@@ -1,4 +1,4 @@
private["_building","_GroupMarker","_list","_nearby","_run"];
private ["_building","_GroupMarker","_nearby","_run","_items"];
_building = _this select 0;
_GroupMarker = _this select 1;
_items = _this select 2;
@@ -15,5 +15,4 @@ while {_run} do {
};
{deleteVehicle _x;} forEach _items;
_building setVariable ["looted",(DateToNumber date),true];

View File

@@ -1,4 +1,4 @@
private["_handle","_body","_cursor","_delMe"];
private ["_handle","_cursor","_delMe","_first","_town","_day","_world","_nearestCity"];
while {true} do {
_handle = [] spawn player_animalCheck;
waitUntil{scriptDone _handle};

View File

@@ -1,4 +1,4 @@
private ["_refObj","_size","_vel","_speed","_hunger","_thirst","_timeOut","_result","_factor","_randomSpot","_mylastPos","_distance","_lastTemp","_rnd","_listTalk","_bloodChanged","_id","_messTimer","_display","_control","_combatdisplay","_combatcontrol","_timeleft","_inVehicle","_tempPos","_lastUpdate","_foodVal","_thirstVal","_lowBlood","_startcombattimer","_combattimeout","_myPos","_lastPos","_debug","_saveTime","_maxDistanceTravel","_maxDistanceDebug","_maxDistanceZeroPos","_maxDistancePlayer","_maxDistanceVehicle"];
private ["_refObj","_size","_vel","_speed","_hunger","_thirst","_timeOut","_result","_factor","_randomSpot","_mylastPos","_distance","_lastTemp","_rnd","_listTalk","_bloodChanged","_id","_messTimer","_display","_control","_combatdisplay","_combatcontrol","_timeleft","_inVehicle","_tempPos","_lastUpdate","_foodVal","_thirstVal","_lowBlood","_startcombattimer","_combattimeout","_myPos","_lastPos","_debug","_saveTime","_maxDistanceTravel","_maxDistanceDebug","_maxDistanceZeroPos","_maxDistancePlayer","_maxDistanceVehicle","_isPZombie"];
disableSerialization;
_timeOut = 0;
_messTimer = 0;