mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
c5e98f17e6
Epoch Update
27 lines
576 B
Plaintext
27 lines
576 B
Plaintext
// In: marker
|
|
// Out: position
|
|
|
|
// Center point
|
|
private ["_center","_centerX","_centerY"];
|
|
_center = getMarkerPos _this;
|
|
_centerX = _center select 0;
|
|
_centerY = _center select 1;
|
|
|
|
// Size
|
|
private ["_size"];
|
|
_size = getMarkerSize _this;
|
|
_size = _size select 0;
|
|
|
|
// Randomly pick a direction,
|
|
private ["_dir","_posX","_posY","_rand","_pos"];
|
|
_dir = random 360;
|
|
_rand = sqrt random 1;
|
|
_posX = (_size * (cos _dir)) * _rand;
|
|
_posY = (_size * (sin _dir)) * _rand;
|
|
_pos = [_posX,_posY];
|
|
|
|
_posX = _centerX + (_pos select 0);
|
|
_posY = _centerY + (_pos select 1);
|
|
|
|
[_posX,_posY,0]
|