Teleport Zombies away

kikyou2

Valued Member!
Hi there,

as you can see at the Safezone Guide thread the Script need to teleport the zombies out of the zone cause they can still attack you - but you not them.

The problem with the old version of the teleport script is that its executed by each client and result in huge lags up to crashing the server or even the whole root. Unfortunately a solution with if (isServer) nether worked for me (for whatever reason).

So I wanted to try to handle this through Game Logics and here is what I tried but it does not work for my (and no errors in .rpt as I can see..)

These next 3 scripts are variations of the script but none had worked from now :/
Basis_East, Basis_West, Basis_East are other Triggers which start the safezone script and I use them to get the right coordinates.

Code:
if (isNil "zombieshieldeast") then {
  zombieshieldeast = true;
} else {
  zombieshieldeast = !zombieshieldeast;
};
 
while {zombieshieldeast &&(isServer)} do {
_pos = getPos Basis_East;
_zombies = _pos nearEntities ["zZombie_Base",140];
_count = count _zombies;
 
 
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setpos [-3367.739,-120.84577,-8247.0625];
};
sleep 5;
};

Code:
zombieshieldsouth = true;
 
 
while {zombieshieldsouth} do {
_pos = getPos Basis_South;
_zombies = _pos nearEntities ["zZombie_Base",140];
_count = count _zombies;
 
 
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setpos [-3367.739,-120.84577,-8247.0625];
};
sleep 5;
};
Code:
// Switch
if (isNil "zombieshieldwest") then {
  zombieshieldwest = true;
} else {
  zombieshieldwest = !zombieshieldwest;
};
 
while {zombieshieldwest} do {
_pos = getPos Basis_West;
_zombies = _pos nearEntities ["zZombie_Base",140];
_count = count _zombies;
 
 
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setpos [-3367.739,-120.84577,-8247.0625];
};
sleep 5;
};


This 3 Logics are the Logics which should start the above scripts.
Code:
class Item3
{
side="LOGIC";
class Vehicles
{
items=1;
class Item0
{
position[]={6265.4658,304.95096,7838.897};
id=802;
side="LOGIC";
vehicle="Logic";
leader=1;
skill=0.60000002;
init="_execute3 = execVM ""zombies/portzombieseast.sqf""";
};
};
};
class Item4
{
side="LOGIC";
class Vehicles
{
items=1;
class Item0
{
position[]={6236.6123,303.93756,7836.6113};
id=803;
side="LOGIC";
vehicle="Logic";
leader=1;
skill=0.60000002;
init="_execute = execVM ""zombies/portzombieswest.sqf""";
};
};
};
class Item5
{
side="LOGIC";
class Vehicles
{
items=1;
class Item0
{
position[]={6251.0396,305.43579,7851.7402};
id=804;
side="LOGIC";
vehicle="Logic";
leader=1;
skill=0.60000002;
init="_execute2 = execVM ""zombies/portzombiessouth.sqf""";
};
};

Anybody has a clue what is wrong?

Thanks!

kikyou2
 
Back
Top