frankiie 10 Posted May 20, 2013 Im working on a PVP map and I'm wanting each base to not get spawn killd, is there a way to create a safe zone, where no bullets can come in go out from a trigger? I researched much, but can't find anything really. Anything is helpful! Share this post Link to post Share on other sites
KevsNoTrev 44 Posted May 20, 2013 have a look on armaholic for a script called grenadestop - it stops bullets to I think. it works on a marker name and a distance to that marker. Share this post Link to post Share on other sites
frankiie 10 Posted May 20, 2013 have a look on armaholic for a script called grenadestop - it stops bullets to I think.it works on a marker name and a distance to that marker. Do you know what you need to name the marker and such? The author didn't seem to post much info, unless im missing something. Share this post Link to post Share on other sites
KevsNoTrev 44 Posted May 20, 2013 try this one from invade and annex - its based on the one by Bake found on armaholic /* 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", 20],["RESPAWN_Guer",20],["respawn-east",15]] // 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]; }; }]; under safety zones you can put you marker names and distances in there. hope that helps. put in your init.sqf file execVM "Grenadestop.sqf"; Share this post Link to post Share on other sites
frankiie 10 Posted May 20, 2013 try this one from invade and annex - its based on the one by Bake found on armaholic /* 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", 20],["RESPAWN_Guer",20],["respawn-east",15]] // 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]; }; }]; under safety zones you can put you marker names and distances in there. hope that helps. put in your init.sqf file execVM "Grenadestop.sqf"; Alright, so I put the grenadestop.sqf AND the init.sqf in my mission file. I didn't really modify anything in the grenadestop.sqf, because I really don't get scripts too much yet, and it could be telling me to change something but I just pass it. lol, but I set two markers one named Marker1 and other marker2. I put the radius's at like 10 but when I spawn with a opfor dude starts to shoot at me nothing happens. well I just die. . What do you think am doing wrong here? :( Share this post Link to post Share on other sites
KevsNoTrev 44 Posted May 20, 2013 Alright, so I put the grenadestop.sqf AND the init.sqf in my mission file. Correct. try adjusting the distance a little. I also can't be sure if this stops the AI shooting. it might take some tweaking but for TvT it works well. Share this post Link to post Share on other sites
frankiie 10 Posted May 20, 2013 Correct. try adjusting the distance a little. I also can't be sure if this stops the AI shooting. it might take some tweaking but for TvT it works well. hmm, ok I was doing something wrong. lol I didn't set down the respawn_west & east markers. how it works. :D Thanks man Share this post Link to post Share on other sites
KevsNoTrev 44 Posted May 20, 2013 good to see you got it worked out. Share this post Link to post Share on other sites
Blue1 10 Posted May 31, 2013 Hey Guys, many thanks for that! I have also implemented it to the mission i am hosting and works fine. br, B Share this post Link to post Share on other sites
zipman 0 Posted January 26, 2014 (edited) oh this works great also to stop teamkilling is there away to add the vehicles and choopers Edited January 26, 2014 by zipman didnt work Share this post Link to post Share on other sites
KevsNoTrev 44 Posted January 27, 2014 This script is for players and when a player gets in a vehicle vehicle player != player So it needs to be adapted to include a vehicle. the only issue is that this will need to be added to all vehicles. that is fine unless you spawn vehicles and they can be driven/flown back to base. /* 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", 20],["RESPAWN_Guer",20],["respawn-east",15]] // Syntax: [["marker1", radius1], ["marker2", radius2], ...] #define MESSAGE "Firing/Grenades Disable this close to Spawn!" if (isDedicated) exitWith {}; _veh = _this; if (_veh != "WeaponHolderSimulated") then { _veh 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]; }; }]; }; Call in init.sqf by using player execvm "GrenadeStop.sqf"; { _x execVM "GrenadeStop.sqf"} foreach vehicles;} NOTE: UNTESTED - just thought of it and heading out. Share this post Link to post Share on other sites