Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- d3z_katana =
- {
- private ["_u", "_difa", "_dif", "_dirT", "_dir", "_difb", "_nObjects"];
- _u = _this select 2;
- if (isPlayer _u) exitwith {};
- _key = _this select 0;
- _keyarray = _this select 1;
- if ((_key select 1) in _keyarray) then
- {
- KatanaRDY = false;
- //hint format["%1", _this select 1];
- _wep = currentmuzzle player;
- if (_wep == "d3z_katana") then
- {
- nul = [] execVM "d3z_katana\z\swing.sqf";
- _nObjects = nearestObjects [player, ["Man"], 2];
- {
- if ((count _nObjects > 1) and (_x != player) and alive _x and KilledOne) then
- {
- _posT = position _x;
- _posP = position player;
- _dir = direction player;
- //_weparray = player weaponDirection "d3z_katana" ;
- //_dir = (_weparray select 0) atan2 (_weparray select 1);
- _posDifx = (_posT select 0) - (_posP select 0);
- _posDify = (_PosT select 1) - (_posP select 1);
- _dirT = _posDifx atan2 _posDify;
- if (_dir >= 180) then
- {
- _difa = (360 - _dir);
- }
- else
- {
- _difa = _dir;
- };
- if (_dirT >= 180) then
- {
- _difb = abs(360 - _dirT);
- }
- else
- {
- _difb = abs(0 + _dirT);
- };
- _max = _difa max _difb;
- _min = _difa min _difb;
- _dif = _max - _min;
- if (_dif < 20) then
- {
- KilledOne = false;
- nul = [_x, _dif] execVM "d3z_katana\z\KillOne.sqf";
- };
- };
- } forEach _nObjects;
- };
- nul = [] execVM "d3z_katana\z\maketrue.sqf";
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement