From 8c84080fdc78ff79ae6057889daf8bac85e9435a Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Sun, 27 Oct 2013 09:31:16 -0500 Subject: [PATCH] fly experiment --- SQF/dayz_code/compile/object_speak.sqf | 3 ++- SQF/dayz_code/compile/player_spawnCheck.sqf | 12 +++++++++++- SQF/dayz_sfx/CfgSounds.hpp | 10 ++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/compile/object_speak.sqf b/SQF/dayz_code/compile/object_speak.sqf index c84267871..f95933338 100644 --- a/SQF/dayz_code/compile/object_speak.sqf +++ b/SQF/dayz_code/compile/object_speak.sqf @@ -19,7 +19,8 @@ _num = switch (_type) do { case "dog_bark": {4}; case "dog_growl": {3}; case "dog_qq": {2}; - case "keypad_tick": {2}; + case "keypad_tick": {2}; + case "flysound": {1}; case "open_backpack": {4}; case "open_inventory": {4}; }; diff --git a/SQF/dayz_code/compile/player_spawnCheck.sqf b/SQF/dayz_code/compile/player_spawnCheck.sqf index 277b38249..bfe47e4aa 100644 --- a/SQF/dayz_code/compile/player_spawnCheck.sqf +++ b/SQF/dayz_code/compile/player_spawnCheck.sqf @@ -1,4 +1,4 @@ -private ["_type","_inVehicle","_dateNow","_maxWildZombies","_age","_radius","_position","_markerstr","_markerstr1","_markerstr2","_markerstr3","_nearByObj","_handle","_looted","_cleared","_zombied","_config","_canLoot","_dis","_players","_nearby","_nearbyCount","_onTheMove"]; +private ["_type","_inVehicle","_dateNow","_maxWildZombies","_age","_radius","_position","_markerstr","_markerstr1","_markerstr2","_markerstr3","_nearByObj","_handle","_looted","_cleared","_zombied","_config","_canLoot","_dis","_players","_nearby","_nearbyCount","_onTheMove","_soundLimit"]; //_t1 = diag_tickTime; _type = _this select 0; @@ -13,6 +13,16 @@ _position = getPosATL player; dayz_spawnZombies = 0; dayz_CurrentZombies = 0; +// experiment with adding fly sounds locally for both zombies and players. +_soundLimit = 3; +{ + if (!alive _x) then { + [player,"flysound",0,true] call dayz_zombieSpeak; + _soundLimit = _soundLimit - 1; + }; + if (_soundLimit == 0) exitWith {}; +} foreach (nearestObjects [player, ["CAManBase"], 8]); + _players = _position nearEntities ["CAManBase",_radius+200]; dayz_maxGlobalZombies = dayz_maxGlobalZombiesInit; { diff --git a/SQF/dayz_sfx/CfgSounds.hpp b/SQF/dayz_sfx/CfgSounds.hpp index 2ed89db21..1125b46c6 100644 --- a/SQF/dayz_sfx/CfgSounds.hpp +++ b/SQF/dayz_sfx/CfgSounds.hpp @@ -586,6 +586,16 @@ class CfgSounds { class z_keypad_tick_2 : z_keypad_tick_0 { sound[] = {"\dayz_sfx\effects\keyPress_c.ogg",1,1,10}; }; + + class z_flysound_0 { + name = ""; + sound[] = {"\ca\Sounds\animals\flies",1,1,10}; + titles[] = {}; + }; + class z_flysound_1 : z_flysound_0 { + sound[] = {"\ca\Sounds\animals\flies2",1,1,10}; + }; + class z_combo_tick_0 { name = ""; sound[] = {"\dayz_sfx\effects\combo_tick.ogg",1,1,10};