SmokeyMeadow
Well-Known Member
This script is lots of fun. On my chernarus server, I changed it to require FoodSteakRaw (I also run the cannibalism script). Now zeds can only be baited with "human" meat.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
private["_agent","_target","_targets","_targetDis","_c","_man","_manDis","_targets","_agent","_agentheight","_nearEnts","_rnd","_assigned","_range","_objects"];
_agent = _this;
_target = objNull;
/*
_local = [];
_remote = [];
*/
_targets = [];
_targetDis = [];
_range = 120;
_manDis = 0;
_refobj = vehicle player;
/*
_local = _agent getVariable ["target",[]];
//diag_log ("Local is: " + str(_local));
_remote = _agent getVariable ["targets",[]];
//diag_log ("Remote is: " + str(_remote));
if (count _remote == 0) then
{
_targets = _local;
//diag_log ("Targets is: " + str(_targets));
}
else
{
_targets = _local + _remote;
//diag_log ("Local + Remote targets is: " + str(_targets));
};
*/
_targets = _agent getVariable ["targets",[]];
if (isNil "_targets") exitWith {};
//Search for objects
if (count _targets == 0) then
{
_objects = nearestObjects [_agent,["ThrownObjects","GrenadeHandTimedWest","SmokeShell","Land_Bucket_EP1"],500];
{
private["_dis"];
if (!(_x in _targets)) then
{
_targets set [count _targets,_x];
_targetDis set [count _targetDis,_dis];
_move = "ZombieFeed";
[objNull, _objects,rPlayMove, _move] call RE;
};
} forEach _objects;
};
//Find best target
if (count _targets > 0) then
{
_man = _targets select 0;
_manDis = _man distance _agent;
{
private["_dis"];
_dis = _x distance _agent;
if (_dis < _manDis) then
{
_man = _x;
_manDis = _dis;
};
if (_dis > _range) then
{
_targets = _targets - [_x];
};
if (_x isKindOf "SmokeShell") then
{
_man = _x;
_manDis = _dis;
};
} forEach _targets;
_target = _man;
};
//Check if too far
if (_manDis > _range) then
{
_targets = _targets - [_target];
_target = objNull;
};
_target
How could buildings zombies remove a particular area of the map? With remove i say dont appear in this area of the map when players enter in this area.Getting an error when i place the bait.
![]()
And also when i am alone in the server....no problem....but when there are other team mates around me when the bucket is down there is extreme lag on the server.
My zombie_findtarget file:
Code:private["_agent","_target","_targets","_targetDis","_c","_man","_manDis","_targets","_agent","_agentheight","_nearEnts","_rnd","_assigned","_range","_objects"]; _agent = _this; _target = objNull; /* _local = []; _remote = []; */ _targets = []; _targetDis = []; _range = 120; _manDis = 0; _refobj = vehicle player; /* _local = _agent getVariable ["target",[]]; //diag_log ("Local is: " + str(_local)); _remote = _agent getVariable ["targets",[]]; //diag_log ("Remote is: " + str(_remote)); if (count _remote == 0) then { _targets = _local; //diag_log ("Targets is: " + str(_targets)); } else { _targets = _local + _remote; //diag_log ("Local + Remote targets is: " + str(_targets)); }; */ _targets = _agent getVariable ["targets",[]]; if (isNil "_targets") exitWith {}; //Search for objects if (count _targets == 0) then { _objects = nearestObjects [_agent,["ThrownObjects","GrenadeHandTimedWest","SmokeShell","Land_Bucket_EP1"],500]; { private["_dis"]; if (!(_x in _targets)) then { _targets set [count _targets,_x]; _targetDis set [count _targetDis,_dis]; _move = "ZombieFeed"; [objNull, _objects,rPlayMove, _move] call RE; }; } forEach _objects; }; //Find best target if (count _targets > 0) then { _man = _targets select 0; _manDis = _man distance _agent; { private["_dis"]; _dis = _x distance _agent; if (_dis < _manDis) then { _man = _x; _manDis = _dis; }; if (_dis > _range) then { _targets = _targets - [_x]; }; if (_x isKindOf "SmokeShell") then { _man = _x; _manDis = _dis; }; } forEach _targets; _target = _man; }; //Check if too far if (_manDis > _range) then { _targets = _targets - [_target]; _target = objNull; }; _target
using: Dayz Origins 1.7.1
There's a file, zombieFindTarget.sqf I thinks the name, you need to edit that makes them attracted to it.
Yea, that's the one. There's a line that needs to be edited to add the bucket. I'm not near my server now, but if u can't find it I can look for it l8r tonight.do you mean the zombie_findTargetAgent.sqf?