TylerHumor Posted January 10, 2015 Report Share Posted January 10, 2015 How would I go about adding a zedshield around a plotpole? I'm running DayZ Overpoch Chernarus. (bland topic) :D Link to comment Share on other sites More sharing options...
0 ElDubya Posted January 10, 2015 Report Share Posted January 10, 2015 Create a file called safearea.sqf and put this in it : while {true} do { sleep 10; // No Zeds near Plot Poles _playerPos = getPos player; _nearPole = nearestObject [_playerPos, "Plastic_Pole_EP1_DZ"]; if (!isNull _nearPole) then { _pos2 = getPos _nearPole; _zombies2 = _pos2 nearEntities ["zZombie_Base", dayz_poleSafeArea]; _count2 = count _zombies2; for "_i" from 0 to (_count2 -1) do { _zombie2 = _zombies2 select _i; _zombie2 setpos [-3367.739,-120.84577,-8247.0625]; }; }; }; Then call it in the init.sqf like this : //Anti Zombie Bases execVM "whereveryouputyourfile\safearea.sqf"; calamity 1 Link to comment Share on other sites More sharing options...
0 TylerHumor Posted January 13, 2015 Author Report Share Posted January 13, 2015 Create a file called safearea.sqf and put this in it : while {true} do { sleep 10; // No Zeds near Plot Poles _playerPos = getPos player; _nearPole = nearestObject [_playerPos, "Plastic_Pole_EP1_DZ"]; if (!isNull _nearPole) then { _pos2 = getPos _nearPole; _zombies2 = _pos2 nearEntities ["zZombie_Base", dayz_poleSafeArea]; _count2 = count _zombies2; for "_i" from 0 to (_count2 -1) do { _zombie2 = _zombies2 select _i; _zombie2 setpos [-3367.739,-120.84577,-8247.0625]; }; }; }; Then call it in the init.sqf like this : //Anti Zombie Bases execVM "whereveryouputyourfile\safearea.sqf"; Thank you sir! I'll go test this! :D Link to comment Share on other sites More sharing options...
0 TylerHumor Posted January 13, 2015 Author Report Share Posted January 13, 2015 Hmm.. no errors on RPT log, but this doesn't seem to be working. Link to comment Share on other sites More sharing options...
0 Creep Posted January 14, 2015 Report Share Posted January 14, 2015 while {true} do {sleep 10;// No Zeds near Plot Poles _playerPos = getPos player;_nearPole = nearestObject [_playerPos, "Plastic_Pole_EP1_DZ"]; <--- this is the error must be: // No Zeds near Plot Poles _playerPos = getPos player;_nearPole = nearestObjects [_playerPos, "Plastic_Pole_EP1_DZ", 30]; //Change the 30 to the radius you want if ((count _nearPole) > 1) then {_pos2 = getPos (_nearPole select 0);_zombies2 = _pos2 nearEntities ["zZombie_Base", dayz_poleSafeArea];_count2 = count _zombies2;for "_i" from 0 to (_count2 -1) do{_zombie2 = _zombies2 select _i;deleteVehicle _zombie2; // makes it more performant I guess};};}; Link to comment Share on other sites More sharing options...
0 TylerHumor Posted January 14, 2015 Author Report Share Posted January 14, 2015 while {true} do {sleep 10;// No Zeds near Plot Poles _playerPos = getPos player;_nearPole = nearestObject [_playerPos, "Plastic_Pole_EP1_DZ"]; <--- this is the error must be: // No Zeds near Plot Poles _playerPos = getPos player;_nearPole = nearestObjects [_playerPos, "Plastic_Pole_EP1_DZ", 30]; //Change the 30 to the radius you want if ((count _nearPole) > 1) then {_pos2 = getPos (_nearPole select 0);_zombies2 = _pos2 nearEntities ["zZombie_Base", dayz_poleSafeArea];_count2 = count _zombies2;for "_i" from 0 to (_count2 -1) do{_zombie2 = _zombies2 select _i;deleteVehicle _zombie2; // makes it more performant I guess};};}; Thank you, to both of you. I'll try it out! :D Link to comment Share on other sites More sharing options...
0 TylerHumor Posted January 14, 2015 Author Report Share Posted January 14, 2015 while {true} do {sleep 10;// No Zeds near Plot Poles _playerPos = getPos player;_nearPole = nearestObject [_playerPos, "Plastic_Pole_EP1_DZ"]; <--- this is the error must be: // No Zeds near Plot Poles _playerPos = getPos player;_nearPole = nearestObjects [_playerPos, "Plastic_Pole_EP1_DZ", 30]; //Change the 30 to the radius you want if ((count _nearPole) > 1) then {_pos2 = getPos (_nearPole select 0);_zombies2 = _pos2 nearEntities ["zZombie_Base", dayz_poleSafeArea];_count2 = count _zombies2;for "_i" from 0 to (_count2 -1) do{_zombie2 = _zombies2 select _i;deleteVehicle _zombie2; // makes it more performant I guess};};}; I tested this by spawning zombies outside the plot pole radius and shooting gun within the 30meter plot pole radius. The zombies were able to run/attack with in the radius and were not affected. Link to comment Share on other sites More sharing options...
0 ElDubya Posted January 15, 2015 Report Share Posted January 15, 2015 That script I posted has been working fine on both my servers since the day I installed it with no errors anywhere. [EDIT : Ahhh ... Just realised I use this script in conjunction with : dayz_poleSafeArea = 30; in my init.sqf. My apologies. If you use the init.sqf edit AND the script in the 2nd post, it will work perfectly.] Link to comment Share on other sites More sharing options...
0 TylerHumor Posted January 15, 2015 Author Report Share Posted January 15, 2015 That script I posted has been working fine on both my servers since the day I installed it with no errors anywhere. [EDIT : Ahhh ... Just realised I use this script in conjunction with : dayz_poleSafeArea = 30; in my init.sqf. My apologies. If you use the init.sqf edit AND the script in the 2nd post, it will work perfectly.] So, would I add "dayz_poleSafeArea = 30;" under "DayZ Epoch Config"? Link to comment Share on other sites More sharing options...
0 Creep Posted January 15, 2015 Report Share Posted January 15, 2015 I tested this by spawning zombies outside the plot pole radius and shooting gun within the 30meter plot pole radius. The zombies were able to run/attack with in the radius and were not affected. just make the script more aggressive change this: sleep 10; to something like sleep 1; Link to comment Share on other sites More sharing options...
0 ElDubya Posted January 16, 2015 Report Share Posted January 16, 2015 So, would I add "dayz_poleSafeArea = 30;" under "DayZ Epoch Config"? Correct. Link to comment Share on other sites More sharing options...
Question
TylerHumor
How would I go about adding a zedshield around a plotpole?
I'm running DayZ Overpoch Chernarus.
(bland topic) :D
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now