Zed Nuker script

ukdayz

Member
this man is machine, thanks sarge :cool:

sorry for stupid question , if my base was say 300m wide, can i add more than one location or a larger radius ?
 
thank god i put put sorry for the stupid question, otherwise i would have looked really stupid for not reading it right the first time :oops:
 
Thi
This is a short script for people that want e.g. community bases zed free.

It does NOT prevent Zeds from spawning, it just kills em after spawn.

Instructions:

a) copy the below script into your missions.pbo, into a folder addons/fixes. (adjust if you know what you do to whatever you like)

b) figure out the center position of your base / place you want protected.

c) edit your init.sqf, at the VERY end, add:

Code:
[[6400, 2720,0],100] execVM "addons\fixes\SAR_nuke_zeds.sqf";

where [6400, 2720,0] is the location, and 100 is the radius to protect. Adjust to your needs.

d) profit.


Script:

Code:
/*
    Author: Sarge
 
    Description:
    Kills all zombies in a given distance from a given point.
 
    Needs 2 parameters:
 
    _location = the exact x/y/z location of the center of the area that should be zed free
    _range = the radius within which zeds get killed
 
 
*/
 
    private["_location","_radius","_nuker","_obj_text_string"];
 
    if(!isServer) exitwith{};
 
    _location = _this select 0;
    _radius = _this select 1;
 
    _nuker = createvehicle ["Sign_sphere25cm_EP1",[_location select 0,_location select 1,1] ,[],0,"NONE"];
    _nuker allowDamage false;
 
    _obj_text_string = format["#(argb,8,8,3)color(%1,%2,%3,%4,ca)",1,1,0,1];
    [nil,nil,rSETOBJECTTEXTURE,_nuker,0,_obj_text_string] call RE;
 
    [_nuker,_radius] spawn {
 
        private ["_nuker","_radius","_entity_array"];
        _nuker = _this select 0;
        _radius = _this select 1;
   
        while {true} do {
   
            _entity_array = (getPos _nuker) nearEntities ["CAManBase",_radius];
            {
                if (_x isKindof "zZombie_Base") then {
                    _x setDamage 1;
                };
            } forEach _entity_array;
            sleep 2;
        };
    };


cheers, Sarge

I just found this snippet Sarge. I assume I could modify the following code to also keep Ai out of the area but what are the ai base syntax?

Code:
     if (_x isKindof "zZombie_Base") then {
                    _x setDamage 1;
 
you could try

Code:
if (! isPlayer _x ) then {
                    _x setDamage 1;

That should kill all AI and zeds. Be aware though that thats then an easy looting generator for players, especially when the AI respawn.

If you dont want AI in your bases, null the corresponding grids in SARGE AI.

Sarge
 
I would if I could figure out what grid is where on the map. The area that I'm using this in isn't a base. It's a debug zone where players first spawn before getting their skins
 
SAR_DEBUG = true, log in as first on the server after a restart - show map - profit :)
 
Using TSW, to set up a dome at this location:
Code:
   <position>
      <x>140.650757</x>
      <y>0</y>
      <z>43.7258949</z>
    </position>
    <radius>4.97029</radius>
I figured I could use those cordinates to set up the radius for this script like:
Code:
[[140.650757, 0,43.7258949],300] execVM "Fixes\SAR_nuke_zeds.sqf";
But it didn't work, anyone mind telling me why?
 
Using TSW, to set up a dome at this location:
Code:
  <position>
      <x>140.650757</x>
      <y>0</y>
      <z>43.7258949</z>
    </position>
    <radius>4.97029</radius>
I figured I could use those cordinates to set up the radius for this script like:
Code:
[[140.650757, 0,43.7258949],300] execVM "Fixes\SAR_nuke_zeds.sqf";
But it didn't work, anyone mind telling me why?


Your coordibates are wrong....it should look like this [[140.650757, 43.7258949, 0]300]

You need the coordinates to be in the x,y,z formation. When your getting your coordinates they are x,z,y. You just need to switch the y and z. Hope this helps.
 
Hi bajaboy, this are my coordinates from the tsw, are they fine or i just need to change anything ?, thanks 7604.53,0.001,6834.67
 
Your coordibates are wrong....it should look like this [[140.650757, 43.7258949, 0]300]

You need the coordinates to be in the x,y,z formation. When your getting your coordinates they are x,z,y. You just need to switch the y and z. Hope this helps.



well ...

a) [[140.650757, 43.7258949, 0]300] is wrong. It should be [[140.650757, 43.7258949, 0],300] instead.
b) These coordinates are VERY low (x and y) which map are these for ? On Chernarus they will be in water ...

Sarge
 
Hi sarge can u give me a hand please? i have this coordinates 7604.53,0.001,6834.67, they are wrong?, thanks for all your awesome scripts : ).-
 
Hi bajaboy, this are my coordinates from the tsw, are they fine or i just need to change anything ?, thanks 7604.53,0.001,6834.67



Use

Code:
[[7604,6834,0],100] execVM "addons\fixes\SAR_nuke_zeds.sqf";

and adjust the radius (100) if needed.

Sarge
 
Back
Top