jhonenglish 2 Posted February 17, 2021 hi, im trying to script an action that its condition will be that you are not visible to enemy units. *( the idea is that you can switch your identitiy (i made an action for that) by luting a dead enemy corpse, but it will be stupid if this works when the enemy can see you doing it)* i tried to do this: _visibilityCheck = {[objNull, "VIEW"] checkVisibility [eyePos (_this select 1), eyePos _x];} forEach (allUnits select {side _x isEqualTo east}); if (_visibilityCheck > 0) then {code...}. ------------------------ but it wont work, any ideas why? Share this post Link to post Share on other sites
major-stiffy 275 Posted February 17, 2021 Set them captive temporarily then undo it? setCaptive Share this post Link to post Share on other sites
gc8 977 Posted February 17, 2021 try knowsAbout to see if the enemy has spotted you 1 Share this post Link to post Share on other sites
LSValmont 789 Posted February 17, 2021 private _canSeePlayer = []; { if ((side group player) getFriend (side group _x) < 0.6 && alive _x && isNull objectParent _x && ([_x, "VIEW"] checkVisibility [eyePos player, eyePos _x]) > 0 && currentWeapon _x != "" && !(lifeState _x isEqualTo "INCAPACITATED")) then {_canSeePlayer = _canSeePlayer + [_x]; player knowsabout _x;} } forEach allUnits; if (_canSeePlayer isNotEqualTo []) then {//code}; That works for me when run on the client! Good luck! 1 Share this post Link to post Share on other sites