Jump to content
Sign in to follow this  
cobrosstuidos

ZORT zombies not working on dedicated server

Recommended Posts

Hello,

I used the ZORT zombie mission template from JasonB to make my own little mission

template here: http://www.armaholic.com/page.php?id=28100

When I test host on LAN the zombies come and kill me and the mission runs fine

but when I upload it to my dedicated game server (gameservers.com) the zombies kill each other and ignore me unless I get right up on top of them and hold still.

Here is the current set-up. Am I going to need a serverini file or something? Or are ZORT zombies not built for dedicated remote servers? Any help would be greatly appreciated, if you need me to post anything else let me know and I will.

4pJmca4.png?1

INIT.SQF FILE

---------------

PLAYER OPTIONS

---------------

Array of players: Very critical information, type in your array of players to spawn around with, it can also use spawns points for

zombies but not recommended. Default: [player]. (You can use Player for SP missions or COOP missions where players stick together).

Otherwise if Multiplayer please enter in names of units. E.g. ArrayOfPlayers = [player01,player02,player03,player04]; (Reccommended MP use - Name all Playable Units).

Zombies will randomise spawning between the array of players.

*/

ArrayOfPlayers = [player01,player02,player03,player04,player05,player06,player07,player08,player09,player10];

/*

Virtual Arsenal: If set to "True", Virtual Arsenal will open on mission startup to allow players to configure their starting loadouts.

Available options include: "True","False". Default: True.

*/

VirtualArsenal = False;

/*

Zombie Death Counter: If set to "True", The player can use an action to see how many Zombies have been killed since the mission has started (Just for fun). (SP only)

Available options include: "True","False". Default: False.

*/

ZombieDeathcount = False;

/*

ZORTFaction: If set to "True", The player will proudly wear the default ZORT uniform on mission Start.

Available options include: "True","False". (Unknown MP Effects) Default: True.

*/

ZORTFaction = False;

/*

First Person Only: If set to "True", The player may not enter 3rd Person Mode. (Unknown MP Effects/SP Only) Default: False.

*/

FirstPersonOnly = False;

/*

---------------

ENVIRONMENT OPTIONS

---------------

Random Weather Effects: If set to "True", A script will run which creates random weather effects such as rain etc during the scenario.

Available options include: "True","False". Default: True.

*/

RandomWeather = False;

/*

Ash: If set to "True", A script will run which showers ash and debris on to the player during the mission.

Available options include: "True","False". Default: True.

*/

AmbientAnimals = False;

/*

Ambient Dog: If set to "True", An ambient Wild Dog will spawn in the environment. Ambient dogs will attack Zombies and Players and

are chased and killed by Zombies. Available options include: "True","False". Default: True.

*/

AmbientDog = True;

/*

Abandoned Campsite: If set to "True", An abandoned campsite can spawn. Campsites can spawn with a random weapons crate.

Available options include: "True","False". Default: True.

*/

AbandonedCampsite = True;

/*

ZORT Ambience Music: If set to "True", ZORT Ambience music will be played in the background. Disable this if you wish to setup your own music.

Default: True.

*/

ZORTAmbienceMusic = True;

/*

---------------

ZOMBIE OPTIONS

---------------

Number of Zombies: While the total amount of Zombies remains unlimited, this is the maximum actual amount of Zombies that will spawn on screen at a time around the player.

A Zombie will respawn once a player moves beyond the maximum spawn distance of a Zombie (dead or alive). This means its possible to clear and hold areas

and moving in fast vehicles will cause Zombies to respawn faster when traversing quickly across the terrain. Monitor for scenario performance.

Available options include any number between 1 - 40. Default: 20.

*/

NumberofZombies = 30;

/*

Zombie Min Spawn Distance: This is the minimum spawn distance in Metres in which a Zombie can spawn around the player.

Available options include any number between 0 - 999999+. Default: 150.

*/

ZombieMinSpawnDistance = 150;

/*

Zombie Max Spawn Distance: This is the maximum spawn distance in Metres in which a Zombie can spawn around the player. Smaller numbers mean more action/encounters.

It is also the number used to determine Zombie despawn/respawn range. For ex. If you set ZombieMaxSpawnDistance = 300, the player would need

to travel 300M away from the Zombie (dead or alive) before it will despawn and then respawn.

Available options include any number between 0 - 999999+. Default: 300.

*/

ZombieMaxSpawnDistance = 300;

/*

Zombie Min Aggro Distance: This number determines the Sight/Smell aggro radius of the Zombie. Note: Zombies taking damage from further away will aggro at a much larger distance.

Smaller distances may improve performance and reduce Zombie chase Confusion. If your zombies are not very responsive, reduce this number.

Available options include any number between 1-999999+. Default: 100.

*/

ZombieMinAggroDistance = 100;

/*

Zombie Max Aggro Distance: This number determines the aggro radius of the Zombie when he takes damage as he is drawn to sound such as gun shots.

Note: Smaller distances may improve performance and reduce Zombie chase Confusion. If your zombies are not very responsive, reduce this number.

Available options include any number between 1-999999+. Default: 200.

*/

ZombieMaxAggroDistance = 200;

/*

Zombie Health: This number indicates how many direct chest shots it will typically take to kill a zombie with a 6.5MM MX Rifle. All other weapons in the game will scale around this

number accordingly. Sniper Rifles will do more damage, whereas pistols will do less than this number. Note: Zombies will always take 1 shot to the head regardless of number,

and Zombies take little to no damage to the legs. A melee attack (if enabled) will always kill a Zombie in 1 hit.

Available options include any number between 1 - 6. Default: 3.

*/

ZombieHealth = 6;

/*

Zombie Speed: This determines the movement speed of Zombies. Available options include ""FULL"", ""NORMAL"", ""LIMITED"".

Note: Must include "" exclamation marks otherwise Zombie will resort to "FULL" by default.

Default: "FULL".

*/

ZombieSpeed = "FULL";

/*

Zombie Damage: This determines the bite strength of Zombies against human targets and indicates how many bites it will take for a zombie to kill any man from full health.

For ex: Soldiers have a health rating of 01 which is the same as 100%. The default Zombie damage is 0.35 then the Zombie deals 35% damage with each hit. It will take 3 hits to kill a man.

Available options include any number between 0 - 01. Default: 0.35.

*/

ZombieDamage = 0.35;

/*

Zombie Crawlers: If set to true, there is a 20% chance that a Zombie will spawn as a crawling Zombie. Available options include "True", "False". Default True.

*/

ZombieCrawlers = True;

/*

---------------------

ZOMBIE LOOT OPTIONS

---------------------

First Aid Kits: If set to true, there is a 10% chance that a Zombie will spawn with a First Aid Kit. Available options include "True", "False". Default True.

*/

ZombieFAKS = True;

/*

Zombie 9MM MAG: If set to true, there is a 10% chance that a Zombie will spawn with two 9MM Magazine for use for all factions. Available options include "True", "False". Default True.

*/

Zombie9MMMag = True;

/*

Zombie 65mm 30Rd MAG: If set to true, there is a 10% chance that a Zombie will spawn with a single 6.5MM 30 Round Magazine Compatible with most Blufor Weapons.

Available options include "True", "False". Default True.

*/

Zombie65MMMag = True;

/*

Zombie Hand Grenades: If set to true, there is a 10% chance that a Zombie will spawn with a Hand Grenade for use for all factions. Available options include "True", "False". Default True.

*/

ZombieHandGrenade = True;

/*

---------------------

ZOMBIE MISC OPTIONS

---------------------

Zombie Clothes Textures: If set to true, Zombies will spawn with a custom bloody texture. You can overwrite the texture files in the image folder for custom

textures. If set to false, Zombies will spawn with civilian clothing. Available options include "True", "False". Default True.

*/

ZombieClothesTextures = True;

/*

Zombie Face Textures: If set to true, Zombies will spawn with a custom Zombie Face Texture (Assuming the user has downloaded the FACE.JPG file).

Available options include "True", "False". Default True.

*/

ZombieFaceTexture = True;

/*

---------------------

ZOMBIE HORDE OPTIONS

---------------------

Zombie Hordes: Allows spawning of Zombie Hordes. Horde Zombie stats remain the same as those given to Zombies above. Available options include "True", "False". Default True.

*/

ZombieHordes = True;

/*

Number of Horde Zombies: Hordes or groups of Zombies can spawn together. If you don't want hordes than set the number to 0. Hordes can be CPU intensive.

Monitor for scenario performance or switch hordes off altogether to save on resources or to increase performance.

Available options include any number between 1 - 20. Default: 10.

*/

NumberofHordeZombies = 10;

/*

---------------

BANDIT OPTIONS

---------------

Bandit: If set to true, A bandit will spawn in the environment. Bandits attack players, civilians and Zombies and Vice Versa.

In this case the enemy of my enemy is not my friend. Possible spawns include Grenadier, Marksman, AT Soldier and Autorifleman.

Add bandits for more challenging gameplay.

Available options include "True", "False". Default False.

*/

Bandit = False;

/*

Bandit Sapper: If set to true, An unarmed bandit will spawn in the environment who is skilled with a blade and is loaded with explosives.

When the Bandit Sapper dies, he explodes.

Available options include "True", "False". Default False.

*/

BanditSapper = False;

/*

Bandit Flamethrower: If set to true, A Bandit with a flamethrower will spawn. Extremely deadly, a bandit flamethrower can clear a

horde of zombies and your squad if your not careful. Take him out from a distance.

Available options include "True", "False". Default False.

*/

BanditFlamethrower = False;

/*

/*

WARNING! DO NOT EDIT BELOW THIS LINE UNLESS YOU ARE AN ADVANCED USER! CREATE BACKUPS OF THIS FILE (INIT.SQF) BEFORE EXPERIMENTING!

More than likely, experimenting below will cause your pc to explode. Create a backup file first.

__________________________________________________________________________________________________________________________________________________________

*/

if (RandomWeather) then {execVM "functions\weather.sqf"};

if (Ash) then {execVM "Environment\Ash.sqf"};

if (Dust) then {execVM "Environment\Dust.sqf"};

if (AmbientAnimals) then {enableEnvironment True} else {enableEnvironment false};

EnableSentences False;

JumpScare = True;

Distraction = False;

PlayerMelee = False;

Player01Melee = False;

Player02Melee = False;

Player03Melee = False;

Player04Melee = False;

Player05Melee = False;

Player06Melee = False;

Player07Melee = False;

Player08Melee = False;

RepetetiveCleanup = True;

DeleteGroups = True;

AmbientTest = 0;

ZombieDeaths = 0;

BanditDeaths = 0;

BluforDeaths = 0;

SurvivorDeaths = 0;

DogDeaths = 0;

Charges = 0;

FlameThrowerReady = True;

If (ZortFaction) then {Player setobjecttexture [1, "Images\ZORTBadge1.jpg"];

Player setobjecttexture [0,"Images\ZORTUniform1.JPG"]; };

if (JumpScarePlayer) then {HeartBeat attachto [Player,[0,0,0]];

HeartBeatBandit attachto [Player,[0,0,0]];

ZombieWarning attachto [Player,[0,0,0]]; };

VoiceBoxPlayer01 attachto [Player,[0,0,0]];

Player addrating +100000;

/*

Author: Hansen111 && JasonB

example: v.1.1 Tested OK

Example: [myciv,200,1,2] call DogChaseAttack_Routine;

*/

DogChaseAttack_Routine = {

_this spawn {

private ["_man","_radius","_sleeptime","_list","_maxheight","_distance","_bloodtarget"];

_man = _this select 0;

_radius = _this select 1;

_sleeptime = _this select 2;

_maxheight = _this select 3;

while {alive _man} do {

sleep _sleeptime;

_list = nearestObjects [_man,["Man","LandVehicle","Air"],_radius];

{

_bloodtarget = _x isKindOf "Man";

if ( (_x != _man && side _x != INDEPENDENT && alive _x && alive _man && ((getPosATL _x) select 2) < _maxheight) && (_bloodtarget || (count (crew _x) > 0)) )

exitWith {

_distance = _man distance _x;

if (_distance > 11.5 && Alive _X) then {_man domove (getPos _x)} else {

if (_bloodtarget) then {

if (_distance <= 2) then {if (_X iskindof "Animal") then {_X setDamage 1} foreach thislist; _Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AinvPercMstpSnonWnonDnon_AmovPercMstpSnonWnonDnon'; _man enableai "Anim"; Sleep 0.05; _man say 'DogBite'; Sleep 0.05; BloodSplatTeeth attachTo [_X, [0.05, 1, 1.2] ]; BloodSplatTeeth Say "Blood"; DeleteVehicle BloodGroundSplatter; BloodGroundSplatter = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; If (random 100 <51) then {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat1.paa"];} else {If (random 100 <51) then {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat2.paa"];} else {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat3.paa"]};}; BloodGroundSplatter setpos getpos _X; BloodGroundSplatter setDir random 360; BloodGroundSplatter setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplatter setPosATL [ position BloodGroundSplatter select 0, position BloodGroundSplatter select 1,0.035]; _x setdammage (getdammage _x + 0.7); if (_X isKindOf "CAManBase" && side _x != EAST) then {_X switchmove "AmovPercMstpSrasWrflDnon_diary"; _X say "Scream1" foreach thislist;} else {}; if (isPlayer _x) then {

"dynamicBlur" ppEffectEnable true;

"dynamicBlur" ppEffectAdjust [6];

"dynamicBlur" ppEffectCommit 0;

"dynamicBlur" ppEffectAdjust [0.0];

"dynamicBlur" ppEffectCommit 5;

Sleep 0.15;

BloodSplatFace attachTo [Player, [0.15, 0.7, 1.325] ];

addCamShake [20, 0.3, 20];

Playsound "Blood";

Playsound "Bones";

Sleep 0.25;

BloodSplatFace attachTo [bladeMaster, [0.1, 0.7, 1.25] ];}; Sleep 0.25; BloodSplatTeeth attachTo [bladeMaster, [0.05, 1, 1.2] ]; DeleteVehicle BloodGroundSplat2; Sleep 1; BloodGroundSplat2 = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; BloodGroundSplat2 setobjecttexture [0, "Images\BloodGroundSplatterSmall.paa"]; BloodGroundSplat2 setpos getpos _X; BloodGroundSplat2 setDir random 360; BloodGroundSplat2 setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplat2 setPosATL [ position BloodGroundSplat2 select 0, position BloodGroundSplat2 select 1,0.035]; Sleep 0.25; DeleteVehicle BloodGroundSplat3; Sleep 2; BloodGroundSplat3 = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; BloodGroundSplat3 setobjecttexture [0, "Images\BloodGroundSplatterSmall.paa"]; BloodGroundSplat3 setpos getpos _X; BloodGroundSplat3 setDir random 360; BloodGroundSplat3 setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplat3 setPosATL [ position BloodGroundSplat3 select 0, position BloodGroundSplat3 select 1,0.035];} else { _man domove (getPos _x)};

}

else {

switch true do {

case (_x isKindOf 'AIR' && alive _man): {if (_distance <= 11.5) then {_Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; Sleep 0.10; _X say 'Metal2'; _x setdammage (getdammage _x + 0.033); VehicleSparks attachTo [_X, [-0.5, 4, -0.35] ];

_X say 'Impact01';

Sleep 0.25;

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ];} else {_man domove (getPos _x)}};

case (_x isKindOf 'TANK' && alive _man): {if (_distance <= 8.5) then {_Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; Sleep 0.10; _X say 'Metal2'; _x setdammage (getdammage _x + 0.00625); VehicleSparks attachTo [_X, [-0.65, 2.5, -0.35] ];

_X say 'Impact01';

Sleep 0.25;

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ];} else {_man domove (getPos _x)}};

case (_x isKindOf 'CAR' && alive _man): {if (_distance <= 6.5) then { _Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; Sleep 0.10; _X say 'Metal2'; _x setdammage (getdammage _x + 0.025); VehicleSparks attachTo [_X, [-0.5, 2.5, -0.35] ];

_X say 'Impact01';

if (_X iskindof "B_Quadbike_01_F" or _X iskindof "B_G_Quadbike_01_F" or _X iskindof "C_Quadbike_01_F") then {_x setdammage (getdammage _x + 0.025)} foreach thislist;

if (_X iskindof "B_APC_Wheeled_01_cannon_F") then {_x setdammage (getdammage _x - 0.0125)} foreach thislist;

Sleep 0.25;

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ]; } else {_man domove (getPos _x)}};

default {_man domove (getPos _x)};

};//switch

};//else

};//else

};//exitWiths

} forEach _list;

};//while

};//spawn

};//function

;

/*

Author: Hansen111 && JasonB

example: v.1.1 Tested OK

Example: [myciv,200,2,2] call ZombieChaseAttack_Routine;

*/

ZombieChaseAttack_Routine = {

_this spawn {

private ["_man","_radius","_sleeptime","_list","_maxheight","_distance","_bloodtarget"];

_man = _this select 0;

_radius = _this select 1;

_sleeptime = _this select 2;

_maxheight = _this select 3;

If (ZombieClothesTextures) then {

_ZombieTex = ceil (random 100);

if (_ZombieTex <= 26) then {_man setobjecttexture [0, "Images\Zombie1.jpg"]}

else {if (_ZombieTex <= 51) then {_man setobjecttexture [0, "Images\Zombie2.jpg"]}

else {if (_ZombieTex <= 76) then {_man setobjecttexture [0, "Images\DefaultZombie.jpg"]}

else {};

};

};

};

If (ZombieFaceTexture) then {_man setface "custom"};

_man setmimic "angry";

if (ZombieCrawlers) then {ZombieRole = ceil (random 100)};

if (ZombieRole <= 21) then {_man setunitpos "Down"; }

else {_man setunitpos "Up"};

_man setVariable ["BIS_noCoreConversations", true];

_man enableFatigue false;

_man allowfleeing 0;

_man disableAI "TARGET";

_man disableAI "AUTOTARGET";

_man disableAI "FSM";

_man setCombatMode "BLUE";

_man setbehaviour "Careless";

_man setspeedmode ZombieSpeed;

Removeallweapons _man;

if (ZombieFAKS) then {ZombieFak = ceil (random 100)};

if (ZombieFak <= 11) then {_man addbackpack "B_OutdoorPack_blu"; _man additem "FirstaidKit"; };

if (Zombie9MMMag) then {Zombie9MMMags = ceil (random 100)};

if (Zombie9MMMags <= 11) then {_man addbackpack "B_OutdoorPack_tan"; _man addMagazine "16Rnd_9x21_Mag"; _man addMagazine "16Rnd_9x21_Mag"; };

if (Zombie65MMMag) then {Zombie65MMMags = ceil (random 100)};

if (Zombie65MMMags <= 11) then {_man addbackpack "B_HuntingBackpack"; _man addMagazine "20Rnd_762x51_Mag"; };

if (ZombieHandgrenade) then {ZombieHandGrenades = ceil (random 100)};

if (ZombieHandgrenades <= 11) then {_man addbackpack "B_OutdoorPack_blk"; _man addItem "HandGrenade"; };

If (ZombieHealth > 0) then {_man removeAllEventHandlers "HandleDamage"; _man setVariable ["selections", []]; _man setVariable ["gethit", []];

_man addEventHandler [ "HandleDamage", { _unit = _This select 0; _unit = _This select 0; _selection = _This select 1; _damage = _This select 2;

if (count (_unit getVariable ["selections", []]) == 0) then { _unit setVariable ["selections", []]; _unit setVariable ["gethit", []]; };

_selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; if !(_selection in _selections) then

{ _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection;

_olddamage = _gethit select _i; _newdamage = _damage - _olddamage; switch (_This select 1) do { case "" : {_damage = _olddamage + _newdamage * 0.05;};

case "head_hit" : {_damage = _olddamage + _newdamage * 0.75;}; case "body" : {_damage = _olddamage + _newdamage * 0.5;}; case "legs" : {_damage = _olddamage + _newdamage * 0.45;}; };

if (_This select 3 != _unit) then { _unit setVariable ["victim", _This select 3]; }; _gethit set [_i, _damage]; _damage; } ] };

If (ZombieHealth > 1) then {_man removeAllEventHandlers "HandleDamage"; _man setVariable ["selections", []]; _man setVariable ["gethit", []];

_man addEventHandler [ "HandleDamage", { _unit = _This select 0; _unit = _This select 0; _selection = _This select 1; _damage = _This select 2;

if (count (_unit getVariable ["selections", []]) == 0) then { _unit setVariable ["selections", []]; _unit setVariable ["gethit", []]; };

_selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; if !(_selection in _selections) then

{ _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection;

_olddamage = _gethit select _i; _newdamage = _damage - _olddamage; switch (_This select 1) do { case "" : {_damage = _olddamage + _newdamage * 0.05;};

case "head_hit" : {_damage = _olddamage + _newdamage * 0.75;}; case "body" : {_damage = _olddamage + _newdamage * 0.3;}; case "legs" : {_damage = _olddamage + _newdamage * 0.45;}; };

if (_This select 3 != _unit) then { _unit setVariable ["victim", _This select 3]; }; _gethit set [_i, _damage]; _damage; } ] };

If (ZombieHealth > 2) then {_man removeAllEventHandlers "HandleDamage"; _man setVariable ["selections", []]; _man setVariable ["gethit", []];

_man addEventHandler [ "HandleDamage", { _unit = _This select 0; _unit = _This select 0; _selection = _This select 1; _damage = _This select 2;

if (count (_unit getVariable ["selections", []]) == 0) then { _unit setVariable ["selections", []]; _unit setVariable ["gethit", []]; };

_selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; if !(_selection in _selections) then

{ _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection;

_olddamage = _gethit select _i; _newdamage = _damage - _olddamage; switch (_This select 1) do { case "" : {_damage = _olddamage + _newdamage * 0.05;};

case "head_hit" : {_damage = _olddamage + _newdamage * 0.75;}; case "body" : {_damage = _olddamage + _newdamage * 0.15;}; case "legs" : {_damage = _olddamage + _newdamage * 0.45;}; };

if (_This select 3 != _unit) then { _unit setVariable ["victim", _This select 3]; }; _gethit set [_i, _damage]; _damage; } ] };

If (ZombieHealth > 3) then {_man removeAllEventHandlers "HandleDamage"; _man setVariable ["selections", []]; _man setVariable ["gethit", []];

_man addEventHandler [ "HandleDamage", { _unit = _This select 0; _unit = _This select 0; _selection = _This select 1; _damage = _This select 2;

if (count (_unit getVariable ["selections", []]) == 0) then { _unit setVariable ["selections", []]; _unit setVariable ["gethit", []]; };

_selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; if !(_selection in _selections) then

{ _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection;

_olddamage = _gethit select _i; _newdamage = _damage - _olddamage; switch (_This select 1) do { case "" : {_damage = _olddamage + _newdamage * 0.05;};

case "head_hit" : {_damage = _olddamage + _newdamage * 0.75;}; case "body" : {_damage = _olddamage + _newdamage * 0.125;}; case "legs" : {_damage = _olddamage + _newdamage * 0.45;}; };

if (_This select 3 != _unit) then { _unit setVariable ["victim", _This select 3]; }; _gethit set [_i, _damage]; _damage; } ] };

If (ZombieHealth > 4) then {_man removeAllEventHandlers "HandleDamage"; _man setVariable ["selections", []]; _man setVariable ["gethit", []];

_man addEventHandler [ "HandleDamage", { _unit = _This select 0; _unit = _This select 0; _selection = _This select 1; _damage = _This select 2;

if (count (_unit getVariable ["selections", []]) == 0) then { _unit setVariable ["selections", []]; _unit setVariable ["gethit", []]; };

_selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; if !(_selection in _selections) then

{ _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection;

_olddamage = _gethit select _i; _newdamage = _damage - _olddamage; switch (_This select 1) do { case "" : {_damage = _olddamage + _newdamage * 0.05;};

case "head_hit" : {_damage = _olddamage + _newdamage * 0.75;}; case "body" : {_damage = _olddamage + _newdamage * 0.1;}; case "legs" : {_damage = _olddamage + _newdamage * 0.45;}; };

if (_This select 3 != _unit) then { _unit setVariable ["victim", _This select 3]; }; _gethit set [_i, _damage]; _damage; } ] };

If (ZombieHealth > 5) then {_man removeAllEventHandlers "HandleDamage"; _man setVariable ["selections", []]; _man setVariable ["gethit", []];

_man addEventHandler [ "HandleDamage", { _unit = _This select 0; _unit = _This select 0; _selection = _This select 1; _damage = _This select 2;

if (count (_unit getVariable ["selections", []]) == 0) then { _unit setVariable ["selections", []]; _unit setVariable ["gethit", []]; };

_selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; if !(_selection in _selections) then

{ _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection;

_olddamage = _gethit select _i; _newdamage = _damage - _olddamage; switch (_This select 1) do { case "" : {_damage = _olddamage + _newdamage * 0.05;};

case "head_hit" : {_damage = _olddamage + _newdamage * 0.75;}; case "body" : {_damage = _olddamage + _newdamage * 0.1;}; case "legs" : {_damage = _olddamage + _newdamage * 0.45;}; };

if (_This select 3 != _unit) then { _unit setVariable ["victim", _This select 3]; }; _gethit set [_i, _damage]; _damage; } ] };

while {alive _man} do {

_ZombieSounds = ceil (random 40);

if (_ZombieSounds <= 1) then {_man say 'Zombie1'}

else {if (_ZombieSounds <= 2) then {_man say 'Zombie2'}

else {if (_ZombieSounds <= 3) then {_man say 'Zombie3'}

else {if (_ZombieSounds <= 4) then {_man say 'Zombie4'}

else {} } } };

sleep _sleeptime;

_list = nearestObjects [_man,["CAManBase","Sheep_Random_F","Goat_Random_F","Alsatian_Random_F","Fin_Random_F","Rabbit_F", "LandVehicle","Air"],_radius];

{

_bloodtarget = _x isKindOf "Man";

if ( (_x != _man && side _x != East && alive _x && alive _man && ((getPosATL _x) select 2) < _maxheight) && (_bloodtarget || (count (crew _x) > 0)) )

exitWith {

_distance = _man distance _x;

if (_distance > 11.5) then {if (Distraction) then {_man domove (getPos ZombieDistractionDevice);} else {_man domove (getPos _x); _man setSpeedMode ZombieSpeed;; };} else {

if (_bloodtarget) then {

if (_distance <= 2.1) then {if (_x isKindOf "Animal") then {_x setdammage (getdammage _x + 1)} foreach thislist; _Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AinvPercMstpSnonWnonDnon_AmovPercMstpSnonWnonDnon'; _man enableai "Anim"; BloodSplatTeeth attachTo [_X, [0.05, 1, 1.2] ]; BloodSplatTeeth Say "Bite"; DeleteVehicle BloodGroundSplatter; BloodGroundSplatter = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; BloodGroundSplatter Say "Bite"; If (random 100 <51) then {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat1.paa"];} else {If (random 100 <51) then {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat2.paa"];} else {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat3.paa"]};}; BloodGroundSplatter setpos getpos _X; BloodGroundSplatter setDir random 360; BloodGroundSplatter setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplatter setPosATL [ position BloodGroundSplatter select 0, position BloodGroundSplatter select 1,0.035]; _x setdammage (getdammage _x + ZombieDamage); if (_X isKindOf "CAManBase") then {_X switchmove "AmovPercMstpSrasWrflDnon_diary"; BloodGroundSplatter say "Scream1" foreach thislist;} else {}; if (isPlayer _x) then {

"dynamicBlur" ppEffectEnable true;

"dynamicBlur" ppEffectAdjust [6];

"dynamicBlur" ppEffectCommit 0;

"dynamicBlur" ppEffectAdjust [0.0];

"dynamicBlur" ppEffectCommit 5;

BloodSplatFace attachTo [Player, [0.15, 0.7, 1.325] ];

addCamShake [20, 0.3, 20];

Playsound "Bones";

BloodSplatFace attachTo [bladeMaster, [0.1, 0.7, 1.25] ];}; BloodSplatTeeth attachTo [bladeMaster, [0.05, 1, 1.2] ]; DeleteVehicle BloodGroundSplat2; BloodGroundSplat2 = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; BloodGroundSplat2 setobjecttexture [0, "Images\BloodGroundSplatterSmall.paa"]; BloodGroundSplat2 setpos getpos _X; BloodGroundSplat2 setDir random 360; BloodGroundSplat2 setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplat2 setPosATL [ position BloodGroundSplat2 select 0, position BloodGroundSplat2 select 1,0.035]; DeleteVehicle BloodGroundSplat3; BloodGroundSplat3 = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; BloodGroundSplat3 setobjecttexture [0, "Images\BloodGroundSplatterSmall.paa"]; BloodGroundSplat3 setpos getpos _X; BloodGroundSplat3 setDir random 360; BloodGroundSplat3 setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplat3 setPosATL [ position BloodGroundSplat3 select 0, position BloodGroundSplat3 select 1,0.035];} else {if (Distraction) then {_man domove (getPos ZombieDistractionDevice); } else {_man domove (getPos _x); _man setSpeedMode ZombieSpeed;; };};

}

else {

switch true do {

case (_x isKindOf 'AIR' && alive _man): {if (_distance <= 11.5) then {_Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; _X say 'Metal2'; _x setdammage (getdammage _x + 0.033); VehicleSparks attachTo [_X, [-0.5, 4, -0.35] ];

_X say 'Impact01';

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ];} else {if (Distraction) then {_man domove (getPos ZombieDistractionDevice); } else {_man domove (getPos _x); _man setSpeedMode ZombieSpeed;; };}};

case (_x isKindOf 'TANK' && alive _man): {if (_distance <= 8.5) then {_Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; _X say 'Metal2'; _x setdammage (getdammage _x + 0.00625); VehicleSparks attachTo [_X, [-0.7, 2.5, -0.35] ];

_X say 'Impact01';

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ];} else {if (Distraction) then {_man domove (getPos ZombieDistractionDevice); } else {_man domove (getPos _x); _man setSpeedMode ZombieSpeed;; };}};

case (_x isKindOf 'CAR' && alive _man): {if (_distance <= 6.5) then {_Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; _X say 'Metal2'; _x setdammage (getdammage _x + 0.025); VehicleSparks attachTo [_X, [-0.5, 2.5, -0.35] ];

_X say 'Impact01';

if (_X iskindof "B_Quadbike_01_F" or _X iskindof "B_G_Quadbike_01_F" or _X iskindof "C_Quadbike_01_F") then {_x setdammage (getdammage _x + 0.025);} foreach thislist;

if (_X iskindof "B_APC_Wheeled_01_cannon_F") then {_x setdammage (getdammage _x - 0.0125)} foreach thislist;

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ]; } else {if (Distraction) then {_man domove (getPos ZombieDistractionDevice); } else {_man domove (getPos _x); _man setSpeedMode ZombieSpeed;;};}};

default {if (Distraction) then {_man domove (getPos ZombieDistractionDevice); } else {_man domove (getPos _x); _man setSpeedMode ZombieSpeed;; };};

};//switch

};//else

};//else

};//exitWiths

} forEach _list;

};//while

};//spawn

};//function

;

/*

Author: Hansen111 && JasonB

example: v.1.1 Tested OK

Example: [myciv,200,1,2] call BanditChaseAttack_Routine;

*/

BanditChaseAttack_Routine = {

_this spawn {

private ["_man","_radius","_sleeptime","_list","_maxheight","_distance","_bloodtarget"];

_man = _this select 0;

_radius = _this select 1;

_sleeptime = _this select 2;

_maxheight = _this select 3;

while {alive _man} do {

sleep _sleeptime;

_list = nearestObjects [_man,["CAManBase","LandVehicle","Air"],_radius];

{

_bloodtarget = _x isKindOf "Man";

if ( (_x != _man && side _x != INDEPENDENT && alive _x && alive _man && ((getPosATL _x) select 2) < _maxheight) && (_bloodtarget || (count (crew _x) > 0)) )

exitWith {

_distance = _man distance _x;

if (_distance > 11.5 && Alive _X) then {_man domove (getPos _x); } else {

if (_bloodtarget) then {

if (_distance <= 2.6) then {if (_X iskindof "Animal") then {_X setDamage 1} foreach thislist; _Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon'; _man enableai "Anim"; Sleep 0.05; _man say 'Knife_Stab'; Sleep 0.05; BloodSplatTeeth attachTo [_X, [0.05, 1, 1.2] ]; BloodSplatTeeth Say "Blood"; DeleteVehicle BloodGroundSplatter; BloodGroundSplatter = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; If (random 100 <51) then {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat1.paa"];} else {If (random 100 <51) then {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat2.paa"];} else {BloodGroundSplatter setobjecttexture [0, "Images\BloodGroundSplat3.paa"]};}; BloodGroundSplatter setpos getpos _X; BloodGroundSplatter setDir random 360; BloodGroundSplatter setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplatter setPosATL [ position BloodGroundSplatter select 0, position BloodGroundSplatter select 1,0.035]; _x setdammage (getdammage _x + 1); if (_X isKindOf "CAManBase" && side _x != EAST) then {_X switchmove "AmovPercMstpSrasWrflDnon_diary"; _X say "Scream1" foreach thislist;} else {}; if (isPlayer _x) then {

"dynamicBlur" ppEffectEnable true;

"dynamicBlur" ppEffectAdjust [6];

"dynamicBlur" ppEffectCommit 0;

"dynamicBlur" ppEffectAdjust [0.0];

"dynamicBlur" ppEffectCommit 5;

Sleep 0.15;

BloodSplatFace attachTo [Player, [0.15, 0.7, 1.325] ];

addCamShake [20, 0.3, 20];

Playsound "Blood";

Playsound "Bones";

Sleep 0.25;

BloodSplatFace attachTo [bladeMaster, [0.1, 0.7, 1.25] ];}; Sleep 0.25; BloodSplatTeeth attachTo [bladeMaster, [0.05, 1, 1.2] ]; DeleteVehicle BloodGroundSplat2; Sleep 1; BloodGroundSplat2 = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; BloodGroundSplat2 setobjecttexture [0, "Images\BloodGroundSplatterSmall.paa"]; BloodGroundSplat2 setpos getpos _X; BloodGroundSplat2 setDir random 360; BloodGroundSplat2 setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplat2 setPosATL [ position BloodGroundSplat2 select 0, position BloodGroundSplat2 select 1,0.035]; Sleep 0.25; DeleteVehicle BloodGroundSplat3; Sleep 2; BloodGroundSplat3 = createVehicle ['UserTexture1m_F', getpos _X, [], 0, "NONE"]; BloodGroundSplat3 setobjecttexture [0, "Images\BloodGroundSplatterSmall.paa"]; BloodGroundSplat3 setpos getpos _X; BloodGroundSplat3 setDir random 360; BloodGroundSplat3 setVectorDirAndUp [[0, 0, -1],[0, -1, 0]]; BloodGroundSplat3 setPosATL [ position BloodGroundSplat3 select 0, position BloodGroundSplat3 select 1,0.035];} else { _man domove (getPos _x); };

}

else {

switch true do {

case (_x isKindOf 'AIR' && alive _man): {if (_distance <= 11.5) then {_Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; Sleep 0.10; _X say 'Metal2'; _x setdammage (getdammage _x + 0.033); VehicleSparks attachTo [_X, [-0.5, 4, -0.35] ];

_X say 'Impact01';

Sleep 0.25;

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ];} else {_man domove (getPos _x); }};

case (_x isKindOf 'TANK' && alive _man): {if (_distance <= 8.5) then {_Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; Sleep 0.10; _X say 'Metal2'; _x setdammage (getdammage _x + 0.00625); VehicleSparks attachTo [_X, [-0.65, 2.5, -0.35] ];

_X say 'Impact01';

Sleep 0.25;

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ];} else {_man domove (getPos _x); }};

case (_x isKindOf 'CAR' && alive _man): {if (_distance <= 6.5) then { _Man lookat getpos _x; _Man setDir ([_Man, _X] call BIS_fnc_dirTo); _man disableai "Anim"; _man switchmove 'AwopPercMstpSgthWnonDnon_End'; _man enableai "Anim"; Sleep 0.10; _X say 'Metal2'; _x setdammage (getdammage _x + 0.025); VehicleSparks attachTo [_X, [-0.5, 2.5, -0.35] ];

_X say 'Impact01';

if (_X iskindof "B_Quadbike_01_F" or _X iskindof "B_G_Quadbike_01_F" or _X iskindof "C_Quadbike_01_F") then {_x setdammage (getdammage _x + 0.025)} foreach thislist;

if (_X iskindof "B_APC_Wheeled_01_cannon_F") then {_x setdammage (getdammage _x - 0.0125)} foreach thislist;

Sleep 0.25;

VehicleSparks attachTo [bladeMaster, [0.1, 0.7, 1.25] ]; } else {_man domove (getPos _x); }};

default {_man domove (getPos _x); };

};//switch

};//else

};//else

};//exitWiths

} forEach _list;

};//while

};//spawn

};//function

;

If (FirstPersonOnly) then {["1stPerson", "onEachFrame", { if (cameraView == "External") then { player switchCamera "Internal"; }; }] call BIS_fnc_addStackedEventHandler};

Playsound "Heartbeat";

0 fadeMusic 0;

0 fadeSound 0;

60 fadeSound 1;

60 fadeMusic 1;

player setDamage 0;

Civilian setFriend [West, 1];

Civilian setFriend [East, 0];

Civilian setFriend [independent, 0];

West setFriend [Civilian, 1];

West setFriend [East, 0];

West setFriend [independent, 0];

Independent setFriend [Civilian, 0];

Independent setFriend [West, 0];

Independent setFriend [East, 0];

East setFriend [Civilian, 0];

East setFriend [West, 0];

East setFriend [independent, 0];

GameStart = True;

If (SPMeleeAttacks) then {PMelee = Player addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMelee.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P01Melee = Player01 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP01.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P02Melee = Player02 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP02.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P03Melee = Player03 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP03.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P04Melee = Player04 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP04.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P05Melee = Player05 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP05.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P06Melee = Player06 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP06.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P07Melee = Player07 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP07.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {P08Melee = Player08 addAction["<t color='##ff1111'>Melee Attack [T]</t>", "GeneralScripts\ManualMeleeP08.sqf" ,[],6,false,false,"LockTarget","_this distance _target < 1"]; };

If (MPMeleeAttacks) then {Player01 RemoveAction PMelee};

If (ZombieDeathCount) then {Player addAction["<t color='#fff1111'>Zombie Death Counter</t>", "GeneralScripts\DeathCount.sqf" ,[],1,false,true,"","_this distance _target < 1"];};

Sleep 1;

If (VirtualArsenal) then {["Open",true] spawn BIS_fnc_arsenal};

EXIT

Share this post


Link to post
Share on other sites

I'm going to dry with the Dynamic Sandbox zombie scripts, but I'll keep this going because I could really use the help.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×