Blanco 0 Posted June 21, 2005 I have this script, I only post a part of it cus the rest is irrelevant <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ... _alarmed=[] #check ?{behaviour _x != "SAFE"} count _newunits > 0 OR "!alive _x" count _newunits > 0 : goto "NEXT" ~1 goto "CHECK" #NEXT ... How can I seperate all the unit(s) who met the condition above and put them in the _alarmed array? I tried : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?{behaviour _x != "SAFE"} count _newunits > 0 OR "!alive _x" count _newunits > 0 :_alarmed = _alarmed + [_x]; goto "NEXT" hint format ["%1",_alarmed] It always return scalar bool array string 0xfcffffef  Share this post Link to post Share on other sites
korax 4 Posted June 21, 2005 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{IF ((behaviour _x != "SAFE") OR (!alive _x)) then {_alarmed = _alarmed + [_x]}} Foreach _newunits Try that? Share this post Link to post Share on other sites
Blanco 0 Posted June 21, 2005 Thx Korax, it works great. Share this post Link to post Share on other sites