SEM/sem/scripts/fn_randomPos.sqf
2017-03-27 15:32:07 +02:00

13 lines
280 B
Plaintext

/* KiloSwiss */
private["_pos","_dir","_dist","_posX","_posY","_newPos"];
_pos = _this;
_dir = random 360;
_dist = (100 + (random 200));
_posX = (_pos select 0) + sin(_dir) * _dist;
_posY = (_pos select 1) + cos(_dir) * _dist;
_newPos = [_posX, _posY, 0];
_newPos;