0.3.9.0 b553

Zombies: fixed issue with multiple targets
moved CfgSounds and CfgSay3Dhandler to mission file
added new mission config (CfgSwitchMovehandler) for
EPOCH_server_handle_switchMove function
minor cleanup to EPOCH_server_handle_say3D usages.
This commit is contained in:
vbawol 2016-07-05 13:22:14 -05:00
parent 66c49bc440
commit 8f3b06f0f4
68 changed files with 1080 additions and 910 deletions

View File

@ -1,7 +1,7 @@
/*%FSM<COMPILE "D:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, zombie">*/
/*%FSM<COMPILE "F:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FSMEditor\scriptedFSM.cfg, zombie">*/
/*%FSM<HEAD>*/
/*
item0[] = {"brainz",0,250,-25.000000,75.000000,75.000000,125.000000,0.000000,"brainz"};
item0[] = {"brainz",0,4346,-25.000000,75.000000,75.000000,125.000000,0.000000,"brainz"};
item1[] = {"_",8,218,125.000000,-175.000000,225.000000,-125.000000,0.000000,""};
item2[] = {"instinct",2,250,125.000000,-250.000000,225.000000,-200.000000,0.000000,"instinct"};
item3[] = {"check",4,218,275.000000,-250.000000,375.000000,-200.000000,5.000000,"check"};
@ -14,7 +14,7 @@ item9[] = {"dispose",4,218,-75.000000,-200.000000,25.000000,-150.000000,200.0000
item10[] = {"imaginary_target",4,218,600.000000,-150.000000,700.000000,-100.000000,70.000000,"imaginary" \n "target"};
item11[] = {"move",4,218,375.000000,-375.000000,475.000000,-325.000000,60.000000,"move"};
item12[] = {"checking_status",2,250,400.000000,-175.000000,500.000000,-125.000000,0.000000,"checking status"};
item13[] = {"smell",4,4314,475.000000,-325.000000,575.000000,-275.000000,90.000000,"smell"};
item13[] = {"smell",4,218,475.000000,-325.000000,575.000000,-275.000000,90.000000,"smell"};
item14[] = {"final_checks___r",4,218,375.000000,-75.000000,475.000000,-25.000000,10.000000,"final" \n "checks / resets"};
item15[] = {"done",4,218,275.000000,-100.000000,375.000000,-50.000000,100.000000,"done"};
item16[] = {"moan",4,218,300.000000,-400.000000,400.000000,-350.000000,70.000000,"moan"};
@ -28,7 +28,7 @@ item23[] = {"hearing___target",4,218,600.000000,-225.000000,700.000000,-175.0000
item24[] = {"spin",2,250,-50.000000,-425.000000,50.000000,-375.000000,0.000000,"spin"};
item25[] = {"wait",4,218,75.000000,-425.000000,175.000000,-375.000000,0.000000,"wait"};
item26[] = {"scream",4,218,200.000000,-425.000000,300.000000,-375.000000,80.000000,"scream"};
item27[] = {"____FAKE____",9,328,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
item27[] = {"____FAKE____",9,0,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
link0[] = {0,17};
link1[] = {1,2};
link2[] = {2,3};
@ -70,8 +70,8 @@ link37[] = {24,25};
link38[] = {25,2};
link39[] = {26,2};
link40[] = {27,10};
globals[] = {0.000000,0,0,0,0,640,480,1,267,6316128,1,-268.969421,732.515686,320.848328,-611.003845,978,884,1};
window[] = {2,-1,-1,-1,-1,603,78,1103,78,3,996};
globals[] = {0.000000,0,0,0,0,640,480,1,267,6316128,1,-268.969421,732.515686,320.848328,-611.003845,978,854,1};
window[] = {2,-1,-1,-32000,-32000,551,26,1051,26,3,996};
*//*%FSM</HEAD>*/
class FSM
{
@ -82,6 +82,7 @@ class FSM
class brainz
{
name = "brainz";
itemno = 0;
init = /*%FSM<STATEINIT""">*/"_zombie = _this select 0;" \n
"_sBomb = _this select 1;" \n
"_head = objNull;" \n
@ -236,8 +237,7 @@ class FSM
"_sound = selectRandom _sounds;" \n
"" \n
"_zombie say3D _sound;" \n
"_say3D_PVS = [player, _zombie,(EPOCH_sounds find _sound), Epoch_personalToken];" \n
"_say3D_PVS remoteExec [""EPOCH_server_handle_say3D"",2];" \n
"[player, _zombie, _sound, Epoch_personalToken] remoteExec [""EPOCH_server_handle_say3D"",2];" \n
"*/" \n
"};" \n
"" \n
@ -263,6 +263,7 @@ class FSM
/*%FSM<LINK "Wait_random">*/
class Wait_random
{
itemno = 17;
priority = 10.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -277,6 +278,7 @@ class FSM
class instinct
{
name = "instinct";
itemno = 2;
init = /*%FSM<STATEINIT""">*/"//systemchat format[""I %1"",diag_tickTime];" \n
"" \n
"" \n
@ -288,6 +290,7 @@ class FSM
/*%FSM<LINK "dispose">*/
class dispose
{
itemno = 9;
priority = 200.000000;
to="pre_dispose";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -307,6 +310,7 @@ class FSM
/*%FSM<LINK "dispose_1">*/
class dispose_1
{
itemno = 5;
priority = 100.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -317,6 +321,7 @@ class FSM
/*%FSM<LINK "attack">*/
class attack
{
itemno = 19;
priority = 90.000000;
to="spin";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -335,6 +340,7 @@ class FSM
/*%FSM<LINK "scream">*/
class scream
{
itemno = 26;
priority = 80.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -349,6 +355,7 @@ class FSM
/*%FSM<LINK "moan">*/
class moan
{
itemno = 16;
priority = 70.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -363,6 +370,7 @@ class FSM
/*%FSM<LINK "move">*/
class move
{
itemno = 11;
priority = 60.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -379,6 +387,7 @@ class FSM
/*%FSM<LINK "check">*/
class check
{
itemno = 3;
priority = 5.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -396,6 +405,7 @@ class FSM
class pre_dispose
{
name = "pre_dispose";
itemno = 4;
init = /*%FSM<STATEINIT""">*/"_nrTrgts = _zedPos nearEntities [_trgtArr, 480];" \n
"_canSee = [];" \n
"{" \n
@ -415,6 +425,7 @@ class FSM
/*%FSM<LINK "wait_dispose">*/
class wait_dispose
{
itemno = 6;
priority = 0.000000;
to="end";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -429,6 +440,7 @@ class FSM
class reset_vars
{
name = "reset_vars";
itemno = 7;
init = /*%FSM<STATEINIT""">*/"//System Vars" \n
"_t = diag_tickTime;" \n
"_u = _t;" \n
@ -486,6 +498,7 @@ class FSM
/*%FSM<LINK "dispose">*/
class dispose
{
itemno = 9;
priority = 200.000000;
to="pre_dispose";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -505,6 +518,7 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
itemno = 1;
priority = 0.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -519,6 +533,7 @@ class FSM
class checking_status
{
name = "checking_status";
itemno = 12;
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@ -526,6 +541,7 @@ class FSM
/*%FSM<LINK "done">*/
class done
{
itemno = 15;
priority = 100.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -537,6 +553,7 @@ class FSM
/*%FSM<LINK "pre_vars___check">*/
class pre_vars___check
{
itemno = 21;
priority = 95.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -599,6 +616,7 @@ class FSM
/*%FSM<LINK "smell">*/
class smell
{
itemno = 13;
priority = 90.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -635,6 +653,7 @@ class FSM
/*%FSM<LINK "sight___target">*/
class sight___target
{
itemno = 22;
priority = 85.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -683,6 +702,7 @@ class FSM
/*%FSM<LINK "hearing___target">*/
class hearing___target
{
itemno = 23;
priority = 80.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -699,6 +719,7 @@ class FSM
/*%FSM<LINK "do_attack">*/
class do_attack
{
itemno = 8;
priority = 60.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -711,6 +732,7 @@ class FSM
/*%FSM<LINK "stuck">*/
class stuck
{
itemno = 20;
priority = 30.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -733,6 +755,7 @@ class FSM
/*%FSM<LINK "final_checks___r">*/
class final_checks___r
{
itemno = 14;
priority = 10.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -783,6 +806,7 @@ class FSM
class end
{
name = "end";
itemno = 18;
init = /*%FSM<STATEINIT""">*/"if (!isNull _zombie) then {" \n
"deleteVehicle _zombie;//Move to cleanup" \n
"};" \n
@ -801,6 +825,7 @@ class FSM
class spin
{
name = "spin";
itemno = 24;
init = /*%FSM<STATEINIT""">*/"_t = diag_tickTime;" \n
"_zombie setVelocityTransformation [_aslPos,_aslPos,_unitV,_unitV,_unitvDir,_vDir,_unitvUp,_unitvUp,2];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@ -809,6 +834,7 @@ class FSM
/*%FSM<LINK "wait">*/
class wait
{
itemno = 25;
priority = 0.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
@ -823,6 +849,7 @@ class FSM
class ____FAKE____
{
name = "____FAKE____";
itemno = 27;
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@ -830,6 +857,7 @@ class FSM
/*%FSM<LINK "imaginary_target">*/
class imaginary_target
{
itemno = 10;
priority = 70.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;

View File

@ -12,18 +12,17 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_antiWall.sqf
*/
private ["_worldPos","_front","_dirTo","_front2"];
private ["_start","_end","_dirTo"];
params ["_unit","_position","_vehicle"];
if (_unit == player) then {
_worldPos = getPosATLVisual _vehicle;
_worldPos set[2, (_worldPos select 2) + 1];
_front = _worldPos;
_start = getPosWorld _vehicle;
// _worldPos set[2, (_worldPos select 2) + 1];
_dirTo = _vehicle getDir player;
_front2 = _vehicle getPos [(_vehicle distance player) + 1, _dirTo];
_end = _vehicle getPos [(_vehicle distance player) + 1, _dirTo];
{
if (_x isKindOf "Const_All_Walls_F") exitWith{
player moveInAny _vehicle;
EPOCH_antiWallCount = EPOCH_antiWallCount + 1;
};
} forEach lineintersectsobjs[ATLToASL _front, ATLToASL _front2, player, _vehicle, true, 2];
} forEach lineintersectsobjs[_start, AGLToASL _end, player, _vehicle, true, 2];
};

View File

@ -37,7 +37,7 @@ _unit = createAgent[_unitClass, position player, [], _zRange, "FORM"];
//};
_unit call _disableAI;
_unit switchMove "AmovPercMstpSnonWnonDnon_SaluteOut";
[[_unit,player], 4, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
[player, "AmovPercMstpSnonWnonDnon_SaluteOut", Epoch_personalToken, _unit] remoteExec ["EPOCH_server_handle_switchMove",2];
_unit setmimic "dead";
_unit setface (selectRandom ["RyanZombieFace1", "RyanZombieFace2", "RyanZombieFace3", "RyanZombieFace4", "RyanZombieFace5"]);

View File

@ -30,19 +30,6 @@ if !(_target isEqualTo player) then {
} else {
if !(isNull _unit && alive _unit) then {
_distance = 5;
_toxicChance = 0.1;
_bleedChance = 1;
_bloodpChance = 0;
_fatigueChance = 0.1;
_bleedAmount = 30;
_bloodpAmount = 2;
_soundEffect = "";
_soundEffectGlobal = -1;
_animationEffect = "";
_animationEffectGlobal = -1;
_canSee = false;
_ppEffect = 0;
_cfgObjectInteraction = (('CfgObjectInteractions' call EPOCH_returnConfig) >> (typeOf _unit));
if (isClass _cfgObjectInteraction) then {
@ -64,27 +51,30 @@ if !(_target isEqualTo player) then {
_animationEffectGlobal = getNumber (_cfgObjectInteraction >> "animationEffectGlobal");
_canSee = call compile (getText (_cfgObjectInteraction >> "canSee"));
_ppEffect = getNumber (_cfgObjectInteraction >> "ppEffect");
};
if ((_unit distance player) < _distance && _canSee) then {
_say3dsoundsConfig = 'CfgSay3Dhandler' call EPOCH_returnConfig;
_switchMovehandlerConfig = 'CfgSwitchMovehandler' call EPOCH_returnConfig;
if (_soundEffect isEqualType []) then {
_soundEffect params ["_soundEffectFinal",["_soundEffectRange",0]];
playSound3D [_soundEffectFinal, _unit, false, getPosASL _unit, 1, 1, _soundEffectRange];
} else {
_soundEffectIndex = EPOCH_sounds find _soundEffect;
if (_soundEffectIndex != -1) then {
_selectedSound = (_say3dsoundsConfig >> _soundEffect);
if (isClass _selectedSound) then {
_unit say3D _soundEffect;
if (_soundEffectGlobal != -1) then {
[player, _unit, _soundEffectIndex, Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
if (_soundEffectGlobal isEqualTo 1) then {
[player, _unit, _soundEffect, Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
};
};
};
if (_animationEffect != "") then {
_selectedMove = (_switchMovehandlerConfig >> _animationEffect);
if (isClass _selectedMove) then {
_unit switchMove _animationEffect;
if (_animationEffectGlobal != -1) then {
[[_unit,player], _animationEffectGlobal, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
if (_animationEffectGlobal isEqualTo 1) then {
[player, _animationEffect, Epoch_personalToken, _unit] remoteExec ["EPOCH_server_handle_switchMove",2];
};
};
@ -96,6 +86,7 @@ if !(_target isEqualTo player) then {
};
if (random 1 < _bloodpChance) then {
EPOCH_playerBloodP = (EPOCH_playerBloodP + (_bloodpAmount + (EPOCH_playerBloodP - 100))) min 190;
// todo configize
if (_ppEffect == 1) then {
[] spawn{
_ppGrain = ppEffectCreate["filmGrain", 2005];
@ -131,4 +122,5 @@ if !(_target isEqualTo player) then {
};
};
};
};
};

View File

@ -215,12 +215,12 @@ if (vehicle player == player) then {
if (isTouchingGround player && speed player > 10) then {
if ((primaryWeapon player != "") && (currentWeapon player == primaryWeapon player)) then {
player switchMove "AovrPercMrunSrasWrflDf";
[player, 1, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
[player, "AovrPercMrunSrasWrflDf", Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
_handled = true;
} else {
if (currentWeapon player == "") then {
player switchMove "epoch_unarmed_jump";
[player, 2, Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
[player, "epoch_unarmed_jump", Epoch_personalToken] remoteExec ["EPOCH_server_handle_switchMove",2];
_handled = true;
};
};

View File

@ -51,7 +51,7 @@ while {player distance _sapper < 100 && alive player} do {
_sounds = ["sapper_groan0","sapper_groan1","sapper_groan2"];
_sound = selectRandom _sounds;
_sapper say3D _sound;
[player, _sapper,(EPOCH_sounds find _sound), Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
[player, _sapper,_sound, Epoch_personalToken] remoteExec ["EPOCH_server_handle_say3D",2];
};
uiSleep 0.5;
};

View File

@ -85,11 +85,10 @@ EPOCH_group_upgrade_lvl = ["CfgEpochClient", "group_upgrade_lvl", [4,"100",6,"30
// Init 3d sound handler
EPOCH_sounds = [];
EPOCH_soundsDistance = [];
_say3dsounds = "isClass _x" configClasses (configFile >> "CfgSay3Dhandler");
_say3dsoundsConfig = 'CfgSay3Dhandler' call EPOCH_returnConfig;
_say3dsounds = "isClass _x" configClasses (_say3dsoundsConfig);
{
EPOCH_sounds pushBack (configName _x);
EPOCH_soundsDistance pushBack getNumber(_x >> "distance");
} forEach _say3dsounds;
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.

View File

@ -9,9 +9,9 @@ class CfgObjectInteractions {
bleedAmount = 0;
bloodpAmount = 0;
soundEffect[] = {};
soundEffectGlobal = -1;
soundEffectGlobal = 0;
animationEffect[] = {};
animationEffectGlobal = -1;
animationEffectGlobal = 0;
canSee = "false";
ppEffect = 0;
aliveState = 0; // 0 = alive or dead, 1 = dead, 2 = alive.
@ -227,7 +227,7 @@ class CfgObjectInteractions {
soundEffect[] = {{"ryanzombies\sounds\attack1.ogg",400}, {"ryanzombies\sounds\attack2.ogg",400}, {"ryanzombies\sounds\attack3.ogg",400}, {"ryanzombies\sounds\attack4.ogg",400}, {"ryanzombies\sounds\attack5.ogg",400}};
soundEffectGlobal = 1;
animationEffect[] = {"AwopPercMstpSgthWnonDnon_throw"};
animationEffectGlobal = 3;
animationEffectGlobal = 1;
canSee = "!(lineIntersects[eyePos _unit, aimPos _target, _unit, _target])";
ppEffect = 0;
interactMode = 3;

View File

@ -0,0 +1,64 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
Custom Epoch config for say3d broadcsting to nearby players.
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgSounds.hpp
*/
class CfgSay3Dhandler {
class snake_bite0 {
distance = 100;
};
class cultist_nearby {
distance = 100;
};
class dog_bark {
distance = 750;
};
class dog_cry {
distance = 600;
};
class hed_cluck0 {
distance = 600;
};
class hed_cluck1 {
distance = 600;
};
class hed_cluck2 {
distance = 600;
};
class cultist_talk {
distance = 30;
};
class cultist_laugh {
distance = 30;
};
class cloak_death {
distance = 30;
};
class drone_alert0 {
distance = 400;
};
class sapper_alert0 {
distance = 400;
};
class sapper_groan0 {
distance = 400;
};
class sapper_groan1 {
distance = 400;
};
class sapper_groan2 {
distance = 400;
};
class sapper_explode {
distance = 1000;
};
};

View File

@ -0,0 +1,67 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
CfgSounds
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgSounds.hpp
*/
class CfgSounds
{
class dog_bark
{
sound[] = { "@A3\Sounds_F\ambient\animals\dog1", 0.6, 1.0 };
titles[] = {};
};
class dog_cry
{
sound[] = { "@A3\Sounds_F\ambient\animals\dog4", 0.6, 1.0 };
titles[] = {};
};
class hed_cluck0
{
sound[] = { "@A3\Sounds_F\ambient\animals\hen1", 0.3, 1.0 };
titles[] = {};
};
class hed_cluck1
{
sound[] = { "@A3\Sounds_F\ambient\animals\hen2", 0.3, 1.0 };
titles[] = {};
};
class hed_cluck2
{
sound[] = { "@A3\Sounds_F\ambient\animals\hen3", 0.3, 1.0 };
titles[] = {};
};
class cultist_talk
{
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_banter1", 0.7, 1.0 };
titles[] = {};
};
class cultist_death
{
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_death", 0.7, 1.0 };
titles[] = {};
};
class cultist_laugh
{
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_laugh", 0.7, 1.0 };
titles[] = {};
};
class cultist_nearby
{
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_nearby", 0.7, 1.0 };
titles[] = {};
};
class cultist_taunt
{
sound[] = { "@x\addons\a3_epoch_assets\sounds\cloak\cultist_taunt", 0.7, 1.0 };
titles[] = {};
};
};

View File

@ -0,0 +1,28 @@
/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
Custom Epoch config for say3d broadcsting to nearby players.
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgSounds.hpp
*/
class CfgSwitchMovehandler {
class AovrPercMrunSrasWrflDf {
distance = 1000;
};
class epoch_unarmed_jump {
distance = 1000;
};
class AwopPercMstpSgthWnonDnon_throw {
distance = 1000;
};
class AmovPercMstpSnonWnonDnon_SaluteOut {
distance = 1000;
};
};

View File

@ -1 +1 @@
build=552;
build=553;

View File

@ -70,8 +70,11 @@ disableRandomization[] = {"All"};
#include "Configs\CfgClientFunctions.hpp"
#include "Configs\CfgObjectInteractions.hpp"
#include "Configs\CfgItemInteractions.hpp"
#include "Configs\CfgSay3Dhandler.hpp"
#include "Configs\CfgSwitchMovehandler.hpp"
// A3 specific configs
#include "Configs\CfgSounds.hpp"
#include "Configs\CfgFunctions.hpp"
#include "Configs\CfgRemoteExec.hpp"

View File

@ -1 +1 @@
build=552;
build=553;

View File

@ -13,18 +13,20 @@
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_antagonists/EPOCH_server_handle_say3D.sqf
*/
private["_range", "_nearBy", "_sound"];
params ["_player",["_target",objNull],["_soundIndex",-1], ["_token","",[""]]];
params [["_player",objNull,[objNull]],["_target",objNull],["_sound","",[""]], ["_token","",[""]]];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
if (isNull _target) exitWith {};
if (isNull _target) then {_target = _player};
_sound = EPOCH_sounds param [_soundIndex,-1];
if !(_sound isEqualTo -1) then {
_range = getNumber(configFile >> "CfgSay3Dhandler" >> _sound >> "distance");
_nearBy = _target nearEntities [["Epoch_Male_F","Epoch_Female_F","LandVehicle","Ship","Air","Tank"], _range];
{
if (isPlayer _x) then {
[_target,_sound] remoteExec ['say3D',_x];
}
}forEach (_nearBy - [_player]); //_this select 0 == the caller, play the sound already locally!
_say3dsoundsConfig = 'CfgSay3Dhandler' call EPOCH_returnConfig;
_selectedSound = (_say3dsoundsConfig >> _sound);
if (isClass _selectedSound) then {
// get nearby players based on range
_range = getNumber(_selectedSound >> "distance");
_nearBy = (_target nearEntities [["Epoch_Male_F","Epoch_Female_F","LandVehicle","Ship","Air","Tank"], _range]) select {isPlayer _x};
// send sound to everyone except caller.
_targets = _nearBy - [_player];
if !(_targets isEqualTo []) then {
[_target, _sound] remoteExec ['say3D',_targets];
};
};

View File

@ -11,40 +11,28 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_antagonists/EPOCH_server_handle_switchMove.sqf
Usage:
[_player,"moveName","token",_target] call EPOCH_server_handle_switchMove;
or
[_player,"moveName","token"] call EPOCH_server_handle_switchMove;
*/
private["_range", "_move", "_nearBy"];
params ["_target","_moveCase",["_token","",[""]]];
_player = _target;
if (_target isEqualType []) then {
_target params ["_target","_player"];
};
params [["_player",objNull,[objNull]],["_move","",[""]],["_token","",[""]],["_target",objNull]];
if !([_player, _token] call EPOCH_server_getPToken) exitWith{};
_range = 0;
_move = "";
if (_move isEqualTo "") exitWith {};
if (isNull _target) then {_target = _player};
// TODO configize
switch (_moveCase) do {
case 1: {
_range = 1000;
_move = "AovrPercMrunSrasWrflDf";
};
case 2: {
_range = 1000;
_move = "epoch_unarmed_jump";
};
case 3: {
_range = 1000;
_move = "AwopPercMstpSgthWnonDnon_throw";
};
case 4: {
_range = 1000;
_move = "AmovPercMstpSnonWnonDnon_SaluteOut";
_switchMovehandlerConfig = 'CfgSwitchMovehandler' call EPOCH_returnConfig;
_selectedMove = (_switchMovehandlerConfig >> _move);
if (isClass _selectedMove) then {
// get nearby players based on range
_range = getNumber(_selectedMove >> "distance");
_nearBy = (_target nearEntities [["Epoch_Male_F","Epoch_Female_F","LandVehicle","Ship","Air","Tank"], _range]) select {isPlayer _x};
// send move to everyone except caller.
_targets = _nearBy - [_player];
if !(_targets isEqualTo []) then {
[_target, _move] remoteExec ['switchMove',_targets];
};
};
if (_range > 0 && _move != "") then {
_nearBy = _target nearEntities [["Epoch_Male_F","Epoch_Female_F"], _range];
{
[_target, _move] remoteExec ['switchMove',_x];
}forEach (_nearBy - [_target]); //_target == the caller, already plays the animation locally!
};

View File

@ -1 +1 @@
build=552;
build=553;

View File

@ -1 +1 @@
build=552;
build=553;

View File

@ -1 +1 @@
552
553