Cryonic. 2 Posted July 3, 2017 I am creating a multiplayer mission and I do not want players or vehicles to take damage in their deployment area. I have already tried creating a trigger and including "player allowDamage false;" and "player allowDamage true;" but it doesn't work very well. I have very little experience in scripting so if you can help me, please be detailed in your explanation. Thanks! Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 3, 2017 https://www.google.de/?gws_rd=ssl#q=arma+3+script+safezone detailed enough? Share this post Link to post Share on other sites
Cryonic. 2 Posted July 3, 2017 23 minutes ago, sarogahtyp said: https://www.google.de/?gws_rd=ssl#q=arma+3+script+safezone detailed enough? I tried your script but it didnt work. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 4, 2017 I did not write a script for it. I just showed u that google has much different solutions for it. crawl them and u should find somethin working or just post a code which u tried and maybe we can help. but without anything? Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 This code makes it so all players and vehicles in the area take no damage and it works. But, I still need a few things from it. 1. I'd like the code to only affect players of a single side in the area. (i.e. Bluefor or Opfor) 2.I need a second safe zone in the script for Opfor. Thanks. 0 = [] spawn { while{true} do { { if(_x distance (getMarkerPos "bluefor_safe_zone") < 200) then {_x allowDamage false} else {_x allowDamage true}; } forEach allUnits + vehicles; sleep 1; }; }; Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 4, 2017 not tested but should do it 0 = [] spawn { while{true} do { { if(_x distance (getMarkerPos "bluefor_safe_zone") < 200) then {_x allowDamage false} else {_x allowDamage true}; true } count (allUnits + vehicles) select {side _x isEqualTo west}; { if(_x distance (getMarkerPos "opfor_safe_zone") < 200) then {_x allowDamage false} else {_x allowDamage true}; true } count (allUnits + vehicles) select {side _x isEqualTo east}; sleep (3 + random 3); }; }; but this is not a good solution for performance reasons. much better would be to create two triggers, each for one sides safezone Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 I tried triggers before but they wouldn't always work. I'm trying your script now. Thanks! Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 Results: Bluefor: player is not invincible vehicles are invincible Opfor: player is not invincible vehicles are not invincible What trigger info should I use? Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 4, 2017 (edited) okay. did not read it carefully. 0 = [] spawn { while{true} do { _justPlayers = (allPlayers - entities "HeadlessClient_F") select {alive _x}; { if(_x distance (getMarkerPos "bluefor_safe_zone") < 200) then {_x allowDamage false} else {_x allowDamage true}; true } count (allUnits + vehicles + _justPlayers) select {side _x isEqualTo west}; { if(_x distance (getMarkerPos "opfor_safe_zone") < 200) then {_x allowDamage false} else {_x allowDamage true}; true } count (allUnits + vehicles + _justPlayers) select {side _x isEqualTo east}; sleep (3 + random 3); }; }; did u notice that u need a second marker for opfors safezone? its called opfor_safe_zone Edited July 4, 2017 by sarogahtyp alive check for plyrs added Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 Yes, I placed a marker labeled opfor_safe_zone. Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 I'm getting an error when I spawn in, but I don't know how to send you the pic. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 4, 2017 copy the error directly from .rpt file. https://community.bistudio.com/wiki/Crash_Files Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 I think this is it Error position: <select {side _x isEqualTo west}; Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 Error in expression <ue}; true } count (allUnits + vehicles) select {side _x isEqualTo west}; { if> 2:41:58 Error position: <select {side _x isEqualTo west}; { Share this post Link to post Share on other sites
pokertour 30 Posted July 4, 2017 did you test this script ?: http://www.armaholic.com/page.php?id=30691 Edit : So you want in your script to protect : - All players and all empty vehicles ? Share this post Link to post Share on other sites
Cryonic. 2 Posted July 4, 2017 I want it to protect players of a specific side and their vehicles. Share this post Link to post Share on other sites