Jump to content
Sign in to follow this  
Blanco

Array question (part2)

Recommended Posts

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  

confused_o.gif

Share this post


Link to post
Share on other sites

<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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×