Prevent Zombie Spawning

xxlsebi

New Member
Hi,

I searched a long time for a script which allows me to set a region where zeds cant spawn..
I tested everything what was posted here in this forum, but nothing worked .. :/

How can I prevent Zed-spawning on my base?
e.g radius of 200m or sth. else..

Greetings!
 
Create a marker in the middle of your base and use this in your condition: (Hint, the 50 is your radius)

Code:
while {yourconditionhere} do
{
    _pos = getMarkerPos "MarkerOne";
    _zombies = _pos nearEntities ["zZombie_Base",50];
    _count = count _zombies;
    for "_i" from 0 to (_count -1) do
    {
        _zombie = _zombies select _i;
        deleteVehicle _zombie;
    };
    sleep 0.5;
};
 
Hi,

thank you for your reply ;)

Does it work if I set the condition to this:
(player distance "MarkerBlabla") < 400

I think the script only have to run if someone is near like 400 meters.
The radius will be set to 200 I think
 
You could create a trigger so when the player steps into it, the code is executed? I haven't tried either out myself yet, that was just from memory , as an example of what might be possible.

Obviously the trigger could be any size you choose :)
 
yep! Remember to disable the script after the players leaves the trigger. I'm not sure if anyone knows a better way to do this, as the trigger method could result in serious lag if say 10 or more players are in that trigger. Like I said before I've not tested this myself, and not being a professional arma 2 script editor I can't guarantee anything.
 
it would be better to run your checks in the spawn zombie code rather than cleaning up after they spawn. Kill it before it happens. much less strain.
 
Tried it before.. but it didnt worked..

player_SpawnCheck.sqf:
around line 157

Code:
if (_age > 3) then {
  _xy_inNoZedZone = (TDC distance _position) < 200;                           
  if(!_xy_inNoZedZone){  // zed-free zone
       _x setVariable ["zombieSpawn",_dateNow,true];
      [_x] call building_spawnZombies;
  };                         
};

result: no loot, no zeds
 
Try fixing this in your building_spawnzombies, instead of your player_spawncheck.sqf

the spawncheck addresses both zeds and loot I believe.
 
Yea i have messed around with stuff in those files, even the maxlocalspawn in Variable.sqf from 40 to 10 but still nothin. i cant seem to find how to tone down the rediculous respawn rate and amount of zombies (running Panthera), can barely make it out of a barracks now haha, and if you do you most likely went through all your ammo you just found to do it lol, also been trying to locate the aggro radius for hearing shots fired, seems like shooting a sidearm like a makarov now aggros everything within 150-200m.

Although it is a zombie mod, the idea of jsut increasing damage/spawnrate/aggro/amount while ignoring the base issues like zombies walking and hitting players through objects/walls. I would rather break the zombies to a low count/respawn and aggro radius and just add AI, because in their current state they are fairly broken. I know everyone enjoys trying to take-off in helicopters now while zombies are hitting you from 20 ft away after you jsut got finished clearing the pad before lift off.
 
The problem is,that zeds are spawned client-side, so Meat (a friend of mine) and me tried to do st else than prevent zeds from spawning to clear a certain area...
What about just teleport them immediatly after spawning to another location???


//executed in init:
Code:
zombieshield=true;
 
while {zombieshield} do {
 
 
_pos = getPos Basis_West;
_zombies = _pos nearEntities ["zZombie_Base",150];
_count = count _zombies;
 
 
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setpos [-3367.739,-120.84577,-8247.0625];
};
 
};


We are not sure if it would be better to make a loop every 10 seconds, or to execute it only when a player enters that area...on first try the server crashed... :(

now we have set the loop every 10 sec and everything seems to work fine:

Code:
zombieshield=true;
 
while {zombieshield} do {
sleep 10;
_pos = getPos Basis_West;
_zombies = _pos nearEntities ["zZombie_Base",150];
_count = count _zombies;
 
 
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setpos [-3367.739,-120.84577,-8247.0625];
};
 
};

( we've not already tested this out with a server population of 60 players)

Maybe someone has got a better idea for a modification of that to decrease laggs and server performance...
 
Yes I thought that it didn't worked for you, so I tested it with integrating in the safezone.sqf. Sorry if it seemed like I wanna claim you work as my own this wasn't what was intended.

I only try to help :)
 
guys hope you can help me out I've tried the above suggestion and cant make a zombie free zone for love of money please could you help me out.
I'm trying to implement the code through a script sqf, the trigger is working but zombies still spawning i only want the trigger to activate once so it looks like the NPC soilders have cleared an area.
cheers thebes
 
Back
Top