Forum Jump :

Author Message


Posts: 7
Rank:


Level: Member

Country: ru
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2013-03-07 23:37        
     
Hello!
How to create a safe zone where you cant shoot and you have no damage? Something like a triggers


Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 34
In-game name: Tajin

 
#2 Posted at 2013-03-08 09:39        
     
Make use of this in a shaped trigger:
http://community.bistudio.com/wiki/allowDamage

Another possiblity would be to use a "hit" Eventhandler. That provides you with more options but is also somewhat more complex to do.

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Advertisement


Author Message


Posts: 7
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 20
In-game name: LCpl M.Fraser

 
#3 Posted at 2013-03-08 10:52        
     
There is a script that is on armaholic called safe zone protect or something i am currently at school so i can not find it right now


Author Message


Posts: 7
Rank:


Level: Member

Country: ru
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2013-03-08 13:24        
     
"player allowDamage false" seems to work. Tell me more how to make a safe area for my multiplayer mission: Sandbox_Vehicle_Test_v3.Stratis.zip


Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 34
In-game name: Tajin

 
#5 Posted at 2013-03-08 13:47        
     
The command I wrote above will do the trick, all you need to do at that point is to learn how to use triggers. (there are several tutorials for that)


You wont get far with scripting/missionmaking if you're not willing to take a few steps on your own (look things up and try stuff out). Thats how it works.

People here will gladly help you out with that, but only as long as it doesn't seem like you expect to get everything served on a silver platter.

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Author Message


Posts: 7
Rank:


Level: Member

Country: ru
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2013-03-08 14:24        
     
This is a simple mission with a revival of the players and vehicles. The map has invulnerable boxes with all existing weapons. I think it will be useful for someone. I only ask to supplement its safe zone


Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 34
In-game name: Tajin

 
#7 Posted at 2013-03-08 15:01        
     
"arma triggers" <-- google that
find this --> https://community.bistudio.com/wiki/Mission_Editor:_Triggers
Read! (or watch one of the many tutorial-videos on YT)

Triggers are a very basic part of ArmA mission editing. They're pretty simple but you wont get far without them.

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Author Message


Posts: 7
Rank:


Level: Member

Country: ru
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2013-03-10 10:05        
     
Tajin, kiss my ass. One web programmer helped me:
1) Open mission folder
(for example "C:\Users\Corwin\Documents\Arma 3 Alpha\missions\Sandbox_Vehicle_Test_v3.Stratis")
and create file "no_shooting.sqf", write it to file:
private ["_eh1","_inArea","_pos","_unit","_zone1","_zone2","_dis"];
_unit = _this select 0;

_zone1 = getMarkerPos "zone1"; // marker name for the areas you want to protect
_zone2 = getMarkerPos "zone2";
_dis = 15;                             // distance from area safe zone starts



if ((_zone1 distance _unit > _dis) or (_zone2 distance _unit > _dis)) then {        //check if unit is in zone when script starts
   _inArea = false;
}else{
   _inArea = true;
   _eh1 = _unit addEventHandler ["fired", {deleteVehicle (_this select 6);}];
};



while {true} do {


   if (((_zone1 distance _unit < _dis) or (_zone2 distance _unit < _dis)) && (!_inArea)) then {      // check if unit enters

      _eh1 = _unit addEventHandler ["fired", {deleteVehicle (_this select 6);}];
      _inArea = true;
      hint "safe zone";
	  _unit allowDamage false;
   };


   if (((_zone1 distance _unit > _dis) or (_zone2 distance _unit > _dis)) && (_inArea)) then {       // check if unit exits

      _unit removeEventHandler ["fired", _eh1];
      _inArea = false;
      hint "You just left the safe zone";
	  _unit allowDamage true;
   };

sleep 1;

};
2) write it to units ini:
nul = [this] execVM "no_shooting.sqf";
3) create 2 markers with names "zone1" and "zone2" in one place
Example mission: Sandbox_Vehicle_Test_v3.Stratis.zip


Author Message


Posts: 20446
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 42
In-game name: Foxhound

 
#9 Posted at 2013-03-10 10:15        
     
@Corwin616
Is something wrong with you? Since when do we insult people who are trying to help? Here on Armaholic we do not appreciate such behaviour!
Warning +1, please be thankfull for any help you get.

Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 7
Rank:


Level: Member

Country: ru
Location:
Occupation:
Age:
In-game name:

 
#10 Posted at 2013-03-10 10:40        
     
He did not help me





This topic is locked, new posts are not allowed.