Jump to content
Sign in to follow this  
kylejtown

MP Safe zone

Recommended Posts

I'm currently working on a mission that has Blufor and Opfor bases. What I need is each base to be protected from fire coming from out side the zone into it, for example Blufor arty firing into the opfor base. I've found a few scripts but none of them stop artillery fire or any type of weapons firing into the zone.

I am currently using a script that keeps you from firing inside the zone but it doesn't take care of outside fire coming into the zone.

/*
   GrenadeStop v0.8 for ArmA 3 Alpha by Bake (tweaked slightly by Rarek)

   DESCRIPTION:
   Stops players from throwing grenades in safety zones.

   INSTALLATION:
   Move grenadeStop.sqf to your mission's folder. Then add the
   following line to your init.sqf file (create one if necessary):
   execVM "grenadeStop.sqf";

   CONFIGURATION:
   Edit the #defines below.
*/

#define SAFETY_ZONES    [["respawn_west", 100],["respawn_guer",100],["respawn_east",100]] // Syntax: [["marker1", radius1], ["marker2", radius2], ...]
#define MESSAGE "Firing/Grenades Disable this close to Spawn!"

if (isDedicated) exitWith {};
waitUntil {!isNull player};

player addEventHandler ["Fired", {
   if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then
   {
       deleteVehicle (_this select 6);
       titleText [MESSAGE, "PLAIN", 3];
   };
}];  

Share this post


Link to post
Share on other sites

Go here mate, should still work for A3 I think..

Basically it stops bullets/projectiles entering the protected zone..

http://forums.bistudio.com/showthread.php?136402-quot-No-Muzzle-quot-Protected-spawn-Zone

As far as I can remember, the zone is maxed out at 25mtrs, confirmation of this would be good.

Also I think it is a circle only. So if you want a larger zone, add markers and the code to add the extra markers into the script. Obviously placing the zones so they overlap slightly.

Share this post


Link to post
Share on other sites

It doesn't seem to be working.

line in init.sqf calling the script:

execVM "scripts\baseprotection\safezone.sqf";

//protection zone approx radius 50m, will overlap
_pos1 = (getMarkerPos "pzone1");
_pzone1 = "ProtectionZone_Ep1" createVehicleLocal (_pos1);
//following makes it invisible
_pzone1 setObjectTexture [0,"#(argb,8,8,3)color(0,0,0,0,ca)"];

I've got the marker called pzone1 but when I went to test it I would still die while I was within 25 meters of the marker. Is there maybe an invicibility script that would just set people to invicible while they are in the zone and when they leave they are no longer invincible?

Thanks for all the help!

Share this post


Link to post
Share on other sites

Is there a way to possibly make units invincible while they are in an area, but when they leave they are no longer invincible?

Share this post


Link to post
Share on other sites
Is there a way to possibly make units invincible while they are in an area, but when they leave they are no longer invincible?

I really need this for some missions I'm working on.

It would need make every object invincible while in the protected area. Protect "empty" Vehicles from taking damage/ being destroyed and when you get in a vehicle to roll out or take off same untill you leave the protected area.

Seems like a better way would be just to prevent or delete any projectile that enters the area (missles, mortar, bullets).

Either way having the ability to make a base/ airfield completely protected and invincible is something that I really need.

Q

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×