taltsinth 1 Posted April 7, 2013 (edited) I'm looking for some help on detecting if an AI unit has joined the player's Group (I.e. Squad). I currently have the AI unit set to 'C1' and group 'groupContact'. C1 = groupContact createUnit ["C_man_1", _markerPos, [], 0, "FORM"]; I pull the player's group via _playerGrp = group player; What I need is a String Comparison command. I've done some searches on here, Armaholic and Google itself and have had no luck (I imagine due to my lack of understanding of what's needed really). Was hoping someone could point me in the right direction. I.e. check if C1 is a member of _playerGrp. Edited April 8, 2013 by TalTsinth Share this post Link to post Share on other sites
ProfTournesol 956 Posted April 7, 2013 C1 in units group player 1 Share this post Link to post Share on other sites
taltsinth 1 Posted April 8, 2013 Doh! So simple yet so elusive. Thank you. Share this post Link to post Share on other sites
taltsinth 1 Posted April 21, 2013 A quick bump and second post to continue this thread as whilst the above work's great in a waitUntil I can't figure out how to use it in an if check. I want to use an if check to determine if C1 is NOT within the player's group within the script and I'm at a loss on how to check that against the player's group. Can anyone point me in the right direction again? Share this post Link to post Share on other sites
arjay 7 Posted April 21, 2013 not sure if this will work? if!(C1 in units group player) then { }; Share this post Link to post Share on other sites
taltsinth 1 Posted April 21, 2013 not sure if this will work? if!(C1 in units group player) then { }; Brilliant! I had been putting the ! inside the bracket's like an idiot. Thanks ARJay. Share this post Link to post Share on other sites