schadler17 36 Posted October 4, 2015 Trying to block a Squad Rally/MHQ from being deployed if units are nearby. Right now, I'm using findNearestEnemy which works, but only enemies KNOWN to your player/group. I'm looking for something more efficient, that detects ALL enemies, even ones not known to the player. I've looked around on google and through forums, but everyone uses the findNearestEnemy script. Share this post Link to post Share on other sites
Jigsor 175 Posted October 5, 2015 How about nearEntities? _searchRadius = 100; _playerPos = getPos player; _friendlySide = side player; _neutralSide = CIVILIAN; _enemyArray = _playerPos nearEntities [["CAManBase"], _searchRadius]; { if ((side _x == _friendlySide) || (side _x == _neutralSide)) then { _enemyArray = _enemyArray - [_x]; }; } count _enemyArray; if ((count _enemyArray) > 0) exitWith {hint "Enemy to close to deploy";}; deploy Squad Rally/MHQ code here... 1 Share this post Link to post Share on other sites
schadler17 36 Posted October 5, 2015 Worked perfectly. Tyvm! Share this post Link to post Share on other sites