[Release] Fred's Anti-Zombie Frequency Emitter (AKA Zombie Shield)

I havnt read through all the posts here but has anyone had an issue with the zombies not targetting players? I installed bait and shield but also have zombie headshots only. Any ideas?
 
This is awesome. I like the bait bomb a little more but this is prime time bad @55ery. Keep the great ideas flowing dude.

Just a hint though... Commenting your code would prevent you from being flooded by a lot of these questions. :)
 
Hi Fred. I really enjoy your script. I'm a scripting n00b, but I adapted a bit of your code to allow players to create other items conditional upon holding certain parts. Currently have it working to make arrows and baseball bats from wood (requires you to have a hunting knife), and also allowing players to clear brush with the hatchet (just constructs a large grass cutter). I think these could be of use to people since it would make the crossbow a bit more useful with its constantly breaking arrows, and who hasn't shot a rabbit only to lose it in tall brush?

I don't want to threadjack this topic, though. With your permission I'd like to start a new topic where I can share this code and maybe have people suggest a few more possibilities to combine.
 
Hi Fred. I really enjoy your script. I'm a scripting n00b, but I adapted a bit of your code to allow players to create other items conditional upon holding certain parts. Currently have it working to make arrows and baseball bats from wood (requires you to have a hunting knife), and also allowing players to clear brush with the hatchet (just constructs a large grass cutter). I think these could be of use to people since it would make the crossbow a bit more useful with its constantly breaking arrows, and who hasn't shot a rabbit only to lose it in tall brush?

I don't want to threadjack this topic, though. With your permission I'd like to start a new topic where I can share this code and maybe have people suggest a few more possibilities to combine.

Permission granted. :)
 
I am still getting kicked for:
28.07.2013 16:34:10: Sandbird(xx.xx.xx.xx:xx) xxxxxxxxxxxxxxxx- #1 1.000000 3:69 ori_zombie7L

But my setdamage.txt is :
Code:
5 "1.000000" !="zZombie_Base" !="z_hunter" !="z_teacher" !="z_villager1" !="z_villager2" !="z_villager3" !="ori_zombie1" !="ori_zombie2" !="ori_zombie3" !="ori_zombie4" !="ori_zombie5" !="ori_zombie6" !="ori_zombie7" !="ori_zombie8" !="ori_zombie1L" !="ori_zombie2L" !="ori_zombie3L" !="ori_zombie4L" !="ori_zombie5L" !="ori_zombie6L" !="ori_zombie7L" !="ori_zombie8L" !="ori_vil_zombie_woman1" !="ori_vil_zombie_woman2" !="ori_vil_zombie_woman3" !="ori_vil_zombie_woman4    " !="z_priest" !="z_doctor" !="z_worker1" !="z_worker2" !="z_worker3" !="z_suit2" !="z_suit1" !="z_policeman" !="z_soldier" !="z_soldier_heavy" !="z_soldier_pilot" !"custom_scripts\zombiebait\zombieshield.sqf"

really weird :/

Using Dayz Origins 1.7.1
 
OVERWATCH USERS, LOOK HERE!

Since the Empty Whiskey Bottles dont spawn, you'll need to do some fixing.

1 - In the zombieshield.sqf, delete this line and save afterwards:

Code:
player removeMagazine "TrashJackDaniels";

2 - In the fn_selfActions.sqf, find this line:

Code:
zombieShield = player addAction [("<t color=""#00c362"">" + ("Anti-Zombie Freq Emitter") +"</t>"),"scripts\zombieshield\zombieshield.sqf","",5,false,true,"",""];

and change it to this line:

Code:
zombieShield = player addAction [("<t color=""#00c362"">" + ("Anti-Zombie Freq Emitter") +"</t>"),"scripts\zombieshield.sqf","",5,false,true,"",""];

3 - In fn_selfActions.sqf, find this line:

Code:
if (("TrashTinCan" in magazines player) && ("TrashJackDaniels" in magazines player) && ("PartEngine" in magazines player) && ("ItemJerrycan" in magazines player) && ("ItemToolbox" in items player)) then {

and change it to this line:

Code:
if (("TrashTinCan" in magazines player) && ("PartEngine" in magazines player) && ("ItemJerrycan" in magazines player) && ("ItemToolbox" in items player)) then {

Save and repack! Voilà!



This will remove the Emtpy Whiskey Bottle from the ingredients, and also call the zombieshield.sqf correctly:)

Thanks a bunch Fred! Awesome script!
 
So, I got this working for myself but it seems to be kicking my players. They get "Client not responding".
Iv even tested it out in-game. Any ideas? Overwatch.
 
Having issues with most of the code, can see nothing in the RPT log but on the client side with script errors enabled theres a whole lot of issues.

First
On the self actions he complains that the zombieshield variable is not declared, the script keeps running and eventually a value is set on that var so he stops complaining.

Second
titleText [You are building an Anti-Zombie Frequency Emitter.,PLAIN DOWN]; titleFadeOut 5;

He complains here, changed it to:

titleText ["You are building an Anti-Zombie Frequency Emitter.","PLAIN DOWN"]; titleFadeOut 5;

Third

_mypos = [(_mypos select 0)+2sin(_dir),(_mypos select 1)+2cos(_dir), (_mypos select 2)];
This doesnt work, changed it to:

_mypos = [(_mypos select 0)+ 1,(_mypos select 1)+1, (_mypos select 2)];

He doesnt complain about this.

Now it goes to the device activated part but stops right after, i'll see if i can figure out by myself but if someone has this working on epoch it would be nice if you could share.
 
  • Like
Reactions: chi
Hey guys. I was wondering if there was anyway to have tjis code activate when a player throws an object like a strobe or something.

I can make it so that I can place a strobe, but im not sure on how to do it so that it will activate the script when a strobe is thrown.
 
I changed this to work when I have the throwable strobe on me, so that players can use it for 2 diff things, but about 5 seconds after it starts killing zombies, it turns back off.

Overpoch/ epoch version 1.0.5.1

private ["_mypos", "_dir", "_createShield", "_sounddist", "_timeplay", "_shield", "_shieldUp", "_timer", "_zombies", "_count", "_zombie", "_soundList"];

player playActionNow "Medic";
sleep 1;
titleText ["You have placed an Anti-Zombie Frequency Emitter.","PLAIN DOWN"]; titleFadeOut 5;

_mypos = getposATL player;
_dir = getdir player;
_mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)];
_createShield = createVehicle ["IR_Strobe_Marker", _mypos, [], 0, "CAN_COLLIDE"];
_createShield setDir _dir;
_createShield setposATL _mypos;
sleep 1;

player removeMagazine "IR_Strobe_Target";
//player removeMagazine "TrashJackDaniels";
//player removeMagazine "TrashTinCan";
//player removeMagazine "PartEngine";
//player removeMagazine "ItemJerrycan";
sleep 0.01;
//player addMagazine "ItemJerrycanEmpty";

titleText ["Device activated.","PLAIN DOWN"]; titleFadeOut 5;

_sounddist = 50;
_timeplay = 18;
while {_timeplay > 1} do {
_shield = nearestObject [player, "IR_Strobe_Marker"];
[nil,_shield,rSAY,["engine_12s", _sounddist]] call RE;

_shieldUp = (alive _shield);
_timer = time;
while {_shieldUp} do {
_zombies = (getPosATL _shield) nearEntities ["zZombie_Base",20];
_count = count _zombies;

for "_i" from 0 to (_count -1) do {
_zombie = _zombies select _i;
_zombie setdamage 1;
sleep 0.01;
};
if ((time - _timer) > 10) exitwith {};
};
_soundList = ["PMC_ElectricBlast1","PMC_ElectricBlast2"] call BIS_fnc_selectRandom;
[nil,_shield,rSAY,[_soundList, _sounddist]] call RE;
_timeplay = _timeplay - 1;
};

sleep 1;
deleteVehicle _createShield;
titleText ["Device deactivated.","PLAIN DOWN"]; titleFadeOut 5;
 
Back
Top