SEM/sem/scripts/fn_randomPos.sqf

13 lines
280 B
Plaintext
Raw Normal View History

2017-03-27 13:32:07 +00:00
/* 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;